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:
Dan Book
Date:
November 11, 2020 16:47
Subject:
Re: Looking for someone to adopt adding trim() to core
Message ID:
CABMkAVVQZOnUKiBGrfUBY_MxbmTraEmE2y4oVpt2xgFoa9a0og@mail.gmail.com
On Wed, Nov 11, 2020 at 10:02 AM demerphq <demerphq@gmail.com> wrote:

> Why does it need to be added to the language as a new keyword? You
> could add it via universal.c to the SCALAR namespace (for example) and
> have it accessible without any feature horribleness. I believe we have
> already approved that such namespaces are acceptable. And additions to
> them do not need any feature bodge and are trivially made backwards
> compatible.
>
> print SCALAR::trim($str);
>
> I vote "no" to this as a feature. But I am fine with it being in core
> via universal.c and the right namespace.
>

This is completely unlike any other language feature and means that code
will forever have to write it this way. I prefer adding it as a feature.

-Dan

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