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

Re: trim vs trimmed revisited

Thread Previous | Thread Next
From:
Felipe Gasper
Date:
February 24, 2022 15:50
Subject:
Re: trim vs trimmed revisited
Message ID:
FEC9DEC0-DE4F-4C25-B44E-61B08D8400E1@felipegasper.com


> On Feb 24, 2022, at 10:38, Paul LeoNerd Evans <leonerd@leonerd.org.uk> wrote:
> 
> On Thu, 24 Feb 2022 10:06:41 -0500
> 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?
>> 
>> The rationale for in-place modification was/is consistency with
>> existing built-ins, esp. chomp. AFAICT that hasn’t changed.
> 
> chop and chomp are already well-acknolwedged as being extreme oddballs
> in perl. Nothing else works quite like them

substr modifies in-place, too. But the examples of uc et al. are also worth considering.

I wasn’t the one who raised the concern with consistency. (IIRC it was Rik/PSC?) I was more just representing an opinion that has been given weight heretofore.

-F

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