develooper Front page | perl.perl5.porters | Postings from November 2020

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

Thread Previous | Thread Next
From:
Konovalov, Vadim
Date:
November 26, 2020 12:53
Subject:
RE: Looking for someone to adopt adding trim() to core
Message ID:
DM5PR1901MB21993ADD800832560ABE23BF8AF90@DM5PR1901MB2199.namprd19.prod.outlook.com
I disagree, with “What Vadim is doing here is having perfect be the enemy of good. Because the change proposed isn't perfect, he opposes it.”
I stated my thoughts quite clear: I am not opposed to trim if it done correctly.
Let it be Scalar::trim – what a problem?

Being just trim makes a necessity to introduce ‘use feature‘, which kills ease of access instantly

PS (sorry for top-posting, my mailer is stupid)

From: Christian Walde <walde.christian@gmail.com>
Sent: Thursday, November 26, 2020 3:14 PM
To: Konovalov, Vadim; Dan Book
Cc: Yuki Kimoto; Karen Etheridge; Paul LeoNerd Evans; demerphq; Scott Baker; Perl5 Porters
Subject: Re: Looking for someone to adopt adding trim() to core

On Thu, 26 Nov 2020 06:11:02 +0100, Dan Book <grinnz@gmail.com<mailto:grinnz@gmail.com>> wrote:
On Wed, Nov 25, 2020 at 11:10 PM Konovalov, Vadim <Vadim.Konovalov@dell.com<mailto:Vadim.Konovalov@dell.com>> wrote:
You’ve made incorrect assumption.
You’re seeking for “$a =~ s/^\s+//; $a =~ s/\s+$//;” in CPAN modules and conclude that all this users want trim function.

I use such regexps often but I do not want trim to be in global space.

IMO introducing some tiny things like ‘say’ or ‘trim’ is not moving forward.
Moving forward is introducing Set()  object into the core language (like Julia do).

Of course not everyone wants a builtin trim function. Also not everyone doesn't, as evidenced by this feature request existing. This is a non-argument.

-Dan

Thank you, exactly that.

Vadim's message also ignores that i ALSO linked a search for trim-like things which has many (tho noisy) hits that are (not proven, but likely) to be situations where the programmer would have preferred to have a trim function already present.

What Vadim is doing here is having perfect be the enemy of good. Because the change proposed isn't perfect, he opposes it.

And Vadim, specifically to you: Instead of stepping on the toes of things that don't hurt you, if you want Set(), write up a documentation and language design proposal and find a core developer willing to implement it.

--
With regards,
Christian Walde

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