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

Re: trim vs trimmed revisited

Thread Previous | Thread Next
Christian Walde
February 25, 2022 18:07
Re: trim vs trimmed revisited
Message ID:
On Thu, 24 Feb 2022 16:06:41 +0100, Felipe Gasper <> wrote:

>> On Feb 24, 2022, at 06:36, Paul LeoNerd Evans <> wrote:
>> Given I think we are now all agreed that mutate-in-place is a terrible
>> idea, I don't think this naming distinction needs to remain.
> What gives you this impression?

Another factor for why it is terrible is that it is impossible to use in an easy-to-read manner in any kind of list-processing functions like map, grep or the myriad others on CPAN.


     my @trimmed = map trim, @strings;

     my @trimmed = map { trim( my $trimmed = $_ ); $trimmed } @strings;

Honestly not a ding on you, but i find myself a little disheartened at how often conversation focuses on the internal mechanics of an implementation and disregards the ux implications.

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