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

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

Thread Previous | Thread Next
February 15, 2021 11:45
Re: Looking for someone to adopt adding trim() to core
Message ID:
On Mon, 15 Feb 2021 at 12:06, Alexander Hartmaier
<> 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 But making that the only way to access this is a
non-starter IMO.


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

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About