develooper Front page | perl.perl5.porters | Postings from February 2021

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

Thread Previous | Thread Next
From:
demerphq
Date:
February 15, 2021 10:53
Subject:
Re: Looking for someone to adopt adding trim() to core
Message ID:
CANgJU+Um2t-FQ2225i4TdvL9bqGLE0gAtJsG_YS3ZFGLhA1j8A@mail.gmail.com
On Mon, 15 Feb 2021 at 11:43, demerphq <demerphq@gmail.com> wrote:
> Adding a function that has a defined prototype is problematic because
> it gets added via the feature API, which means it is enabled like
> this:

This sentence got a bit mangled. It should have read like this:

Adding a function that has a defined prototype is problematic when it
gets added via the feature API which is inherently backwards
incompatible, and defined prototype functions do not require any
backwards incompatible support.  This is purely because it gets added
via the feature API which means it is enabled like this:

>
>   use feature qw(say);
>
> and now we have a say() keyword with the same magic properties of print().

The summary here is that features are for things which change perls
grammar and are inherently not backwards compatible. trim() does not
change perls grammar, and there is no reason it cannot be made
backwards compatible, and therefore we shouldnt use a feature to
enable it in the language.

cheers,
Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

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