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

Re: trim vs trimmed revisited

Thread Previous | Thread Next
From:
Christian Walde
Date:
February 25, 2022 18:07
Subject:
Re: trim vs trimmed revisited
Message ID:
op.1h5q9yjdydyjqt@xenbox.cihq
On Thu, 24 Feb 2022 16:06:41 +0100, Felipe Gasper <felipe@felipegasper.com> wrote:

>> On Feb 24, 2022, at 06:36, Paul LeoNerd Evans <leonerd@leonerd.org.uk> 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.

Compare:

     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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About