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 26, 2020 13:02
Subject:
Re: Looking for someone to adopt adding trim() to core
Message ID:
op.0uow5yk2ydyjqt@xenwide.vpn.udag.de
On Thu, 26 Nov 2020 13:53:48 +0100, Konovalov, Vadim <Vadim.Konovalov@dell.com> wrote:

>
> I disagree, with “What Vadim is doing here is having perfect be the enemy of good. Because the change proposed >isn't perfect, he opposes it.”
>
> I stated my thoughts quite clear: I am not opposed to trim if it done correctly.
>
> Let it be Scalar::trim – what a problem?
>
>
> Being just trim makes a necessity to introduce ‘use feature‘, which kills ease of access instantly
>
>
> PS (sorry for top-posting, my mailer is stupid)

When i said you are opposing it, I was talking about CORE::trim, gated by the feature pragma.

I understand you're fine with trim in another namespace and consider that to be a perfect solution, but that's not what this PR is.

Also, as for ease of access, i understand your concern, but that's not really how it'll be.

Once trim is stabilized, it will be added to a perl version bundle, and the -E oneliner argument, making it very easy to use, e.g.:

     use 5.036;
     say "input: ".trim <STDIN>;

or

     # perl -E ' say "input: ".trim <STDIN>'
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