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 11:45
Subject:
Re: Looking for someone to adopt adding trim() to core
Message ID:
CANgJU+UAEjULWux+DErU9OuHkNf9w5HQtupdxSxHyH99_47J0Q@mail.gmail.com
On Mon, 15 Feb 2021 at 12:06, Alexander Hartmaier
<alex.hartmaier@gmail.com> wrote:
>
> The whole point of adding trim to core is to *not* have to install a module from CPAN.

Yes, and doing it the way I said you do NOT have to install a module
from CPAN. You can use scalar::trim in your code and be locked into
the future. But the rest of us that want to use trim and want to have
backwards compatible code can use the Shim module. Its not like it
hurts anything.

Turn this around, you are arguing that pretty much every credible
library author will not be able to use trim in their code, or take
advantage of core devs fixing bugs, etc. The only people that will be
able to use it will be a small constituency of devs who write code
only for the most recent perls.

So why is it that you think its ok to have it /exactly/ the way you
want it, and screw everybody else?

My approach you get what you want with a bit more characters to type
and everybody gets to use the new nice thing.

Why are we even arguing about this?

> trim is the same as many other core functions like lc, uc and chomp, do you say that all future functions should be prefixed with something just to ensure that they might clash with some function someone has defined in their code?

Oh come on. Perl is a language with a long pedigree, having a flat
namespace with a load of keywords is a consequence of that early
history. We have had proper namespace management in perls for what, 20
years now, and we have used them to solve these problems with
absoluitely no controversy at all. The only time it gets controversial
is when people want to inject their favourite keyword into every
namespace or to use feature as a way to import functions instead of
using the normal way.

Anyway, heck, i am sure as long the base implementation was
scalar::trim() then I am sure we could fake up some support in
feature.pm. But making that the only way to access this is a
non-starter IMO.

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