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

Re: Let's talk about trim() so more

Thread Previous | Thread Next
Christian Walde
March 27, 2021 00:13
Re: Let's talk about trim() so more
Message ID:
On Sat, 27 Mar 2021 01:08:04 +0100, Ricardo Signes <> wrote:

> On Fri, Mar 26, 2021, at 6:40 PM, Darren Duncan wrote:
>> I know I wasn't following this issue in detail but I was always assuming that atrim() would NOT modify its argument and would return the trimmed value.  Thisis what everyone would reasonably expect.  This is the only version that isactually useful..
> This is a weird position to take in the face of people (including me and several Perl programmers not on this list >whom I asked) expecting modify-in-place and thinking it would be useful.
> I'm not even trying to tell you to agree.  I'm just saying "no one would expect that or find it useful" is … well, a >weird claim.  (Do you think I would be suggesting we adopt some behavior that I found surprising and useless?)

I think this comes down to the same issue as with the "new defaults" thing.

Originally no-strict perl was intended by Larry to be easier and approachable for newbies and literally called "baby perl". Nowadays there's a lot of people claiming we must enforce strict as hard as we can because it's best for newbies.

I suspect people with different expectations of trim and thoughts about chomp come more often than not from different generations of learning.

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