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

[OT] Re: Revisiting trim

Thread Previous | Thread Next
From:
=?UTF-8?Q?Andr=c3=a9_Warnier_=28tomcat/perl=29?=
Date:
May 28, 2021 17:23
Subject:
[OT] Re: Revisiting trim
Message ID:
798fd01d-ba38-ad1a-ee88-651c52fb1795@ice-sa.com
I'd like to say first that I am very happy that there are people still very interested and 
motivated to support and even improve and expand perl, and many thanks to them all.

On 28.05.2021 18:25, Joseph Brenner wrote:
> I think tchrist probably has a point about the clarity of "trimmed",
> but I suspect if it'd been up to Larry Wall, he'd have gone with the
> shortest form.   For some reason "trim", "trim('R')" and "trim('L')"
> seem perlish too me

I believe that we shouldn't try to "ape" too much what other languages are doing (*). Perl 
is perl and it is "perlish", and that is part of its attraction. If we were to make it 
less distinguishable from other scripting languages, we may end up making it even less 
attractive, in a sense of "what would be the point then ?". (**)
So I like "trimmed()", maybe just /because/ it's different from others.
As someone said previously - in jest I assume, but with a considerable bit of truth in it 
- if I wanted python (or Ruby, Javascript, PHP, Raku ..) I know where to find them.


(*) It's just that a simple-looking string trimming function is a very useful and 
practical thing to have, and that the absence of it is one of the first things that perl 
ignorami focus on. And ok, the next time this comes up, I'd love to be able to rub their 
nose in it and "perldoc -f trimmed" them.
(**) come to think of it, it would also be tantamount to admitting that all these 
scripting newbies had a point, and we don't really want to do that, do we ?


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