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

Re: Looking for someone to adopt adding trim() to core

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
February 11, 2021 01:03
Subject:
Re: Looking for someone to adopt adding trim() to core
Message ID:
CAHhgV8gK+cFXdu14R6wcMbrB8eCnnXgiqNE7Vj7jDB27GXRsXA@mail.gmail.com
On Wed, Feb 10, 2021 at 7:38 PM Paul "LeoNerd" Evans
<leonerd@leonerd.org.uk> wrote:
>
> On Wed, 10 Feb 2021 19:22:50 +0100
> Leon Timmermans <fawaka@gmail.com> wrote:
>
> > It's more like the functions in List::Util, which we never cored.
> ...
> > In particular I would not
> > understand a policy that includes trim but doesn't include much of
> > Scalar::Util.
>
> Almost certainly sure the answer is "because nobody got around to it".
>
> I'll have a look into it once I've finished `try/catch`.
>
> I suspect at minimum we'd want all of:
>
>   (Scalar::Util::)blessed
>                   refaddr
>                   reftype
>                   weaken
>                   unweaken
>                   isweak

It has been tried before at least once, actually.

> As to the list things, I'm also intending to have some optree-shaped
> stuff that can do
>
>   List::Util::any
>               all
>               none
>               notall
>               first
>               reduce
>
> Maybe also
>
>   List::Util::head
>               tail
>
> and further down the list things start to get a bit less exciting.
>
> But overall - yes, it'd be nice to get more of those
> {Scalar,List}::Util things into core as well. It just needs someone to
> do it. Why it hasn't been done is much like why nobody's added
> try/catch until now - nobody asked.

I think you missed my point. I'm not arguing for or against the
inclusion of anything here (I'll leave that for another discussion),
I'm arguing for consistency instead of "it scratches someone's itch".
The latter is not sustainable or maintainable.

Leon

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