develooper Front page | perl.perl5.porters | Postings from November 2020

Re: Looking for someone to adopt adding trim() to core

Thread Previous | Thread Next
From:
Christian Walde
Date:
November 18, 2020 23:03
Subject:
Re: Looking for someone to adopt adding trim() to core
Message ID:
op.0uavk5sqydyjqt@xenwide.vpn.udag.de
The point is to minimize the work a non-cpan developer has to do to have access to the function.

Precisely because it's implementation is so small, in the range of the code needed for say, it must also be able to be used with minimum effort.

The suggestions you have, of tracking dependencies beyond Perl version, would increase the work-to-use needed to a point where the entire undertaking is wholly pointless.


Also, to be frank, nothing you said actually adresses the email you replied to. At all.


say is also "just a function" and is extremely similar in many ways. To treat trim any different from say requires extremely strong arguments to explain how it is different from say.


On Wed, 18 Nov 2020 23:31:41 +0100, Yuki Kimoto <kimoto.yuki@gmail.com> wrote:

> I think trim is just a function.
>
> The function means that it takes arguments and returns return value.
>
> I think the benefits of adding trim as a Perl grammar are small.
>
> I think it's a best idea to add trim to Scalar::Util.
>
> use Scalar::Util 'trim';
>
> trim $string;
>
> The reason is that there are a few changes and the benefits are great.
>
> I think The next best idea is to add a new namespace.
>
> use Scalar 'trim';
>
> trim $string;
>
> This adds a new namespace, or module, so the size of the changes will be a bit larger.
>
>
> 2020年11月19日(木) 5:20 Christian Walde <walde.christian@gmail.com>:
>> One more note:
>>
>> say is EXTREMELY similar to trim, and as far as i can tell was VERY well received and caused no significant >>issues. Right?
>>
>> --With regards,
>> Christian Walde
Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About