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

Re: trim vs trimmed revisited

Thread Previous | Thread Next
From:
Neil Bowers
Date:
February 26, 2022 10:10
Subject:
Re: trim vs trimmed revisited
Message ID:
faba137f-1687-4dc5-944f-1c6a6c882c11@Spark
We discussed this in the PSC meeting, and have accepted that it should go ahead as "trim" and not "trimmed".

At least two PSC members disagree with this, but the role of the PSC is to, as much as possible, build consensus, moving the language forward, while guarding against mistakes. We’re the steering council – I should have read the fine print more closely before taking this job.

Personally, I wanted a trim() that edits in place[*], and having chosen to leave that hill, I thought trimmed was the best name (based on convincing anecdotal evidence that it reduced confusion, compared to trim).

It should warn when called in a void context, so:

	trim($foo);

should produce a warning.

Moving on,
Neil

[*] trim() editing in place felt most perlish, but we all have different definitions and feelings about "perlish", so please resist the temptation to reply to this footnote :-)

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