develooper Front page | perl.perl5.porters | Postings from March 2021

Re: Let's talk about trim() so more

Thread Previous | Thread Next
Chris Prather
March 26, 2021 23:37
Re: Let's talk about trim() so more
Message ID:
On Fri, Mar 26, 2021 at 6:42 PM Philip R Brenan <>

> Perfection is achieved, not when there is nothing more to add, but when
> there is nothing left to take away.
> Antoine de Saint-Exupery
> <>
I love this quote, it's one of the one's Stevan recited frequently
regarding the design of Moose.

On the one hand `trim()` is expanding the number of builtin functions and
littering the namespace with extra things to remember. A differing view is
that that is that `trim()` removes a common use of `s/^\s+|\s+$//g` and
everything that entails the user to understand about Perl's implementation
of regular expressions for the simple common case of "removing starting and
trailing whitespace".

Interpreting this maxim with the idea that syntax is what should be taken
away, you end up with the lambda calculus, tinyBF, and OISC computers where
they are beautiful in their simplicity, but maximize the amount of
information the programmer has to maintain while programming. Interpreting
this maxim the other way you end up with ... well the common punchline when
I was starting out was "Perl."

Antoine de Saint-Exupery isn't famous for writing empty books, he's famous
for an expressive use of poetic language that contained enough, but no
more. Perl is certainly not a minimalist language, but in my experience it
tries (sometimes unsuccessfully) to allow for an expressive use of poetic
language that minimizes how much state the developer has to maintain in
their head at a time.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About