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

Re: Initial hack at 'builtin::' namespace | online TODO list ofindividual functions

Thread Previous | Thread Next
From:
Paul "LeoNerd" Evans
Date:
December 16, 2021 18:08
Subject:
Re: Initial hack at 'builtin::' namespace | online TODO list ofindividual functions
Message ID:
20211216180816.7bb2db0a@shy.leonerd.org.uk
On Wed, 15 Dec 2021 21:14:44 +0000
"Paul \"LeoNerd\" Evans" <leonerd@leonerd.org.uk> wrote:

> Ohright, yes that's an excellent point. The whole lot probably ought
> to be warning that, indeed.

The more I think about it, the more I'm suddenly not sure if actually
every builtin function ought to be warning that it is experimental.

The entire list currently looks like this:

  true, false                # names for !!1 and !!0 constants

  isbool                     # a wrapper for SvIsBOOL

  weaken, unweaken, isweak   # copied from Scalar::Util
  blessed, refaddr, reftype

Of these 9 functions, 2 are names for constants that have been in
perl for basically all of time, and 6 are copies of same-named same
behaviour from Scalar::Util where they've been for a good decade or
more. Only `isbool` is actually new here.

I wonder quite what the overall "experimental" status of these things
ought to be. In practice the design of the latter 6 of these is
entirely fixed, being a clone of the "set in stone" design from
Scalar::Util. Perhaps the idea of "builtin" in the first place is
experimental, but at least those final 6 functions can't really be very
flexible within it. They're constrained by the past ~20 years of
Scalar::Util usage. The same however can't be said for actual new
designs - maybe some mythical trim() that turns up at some point in the
future, or new things related to type systems, object systems, whatever
else we might add down the line.

Overall then I'm not sure whether it makes sense to just add a single
"experimental::builtin" category that can be turned on or off in bulk,
because that doesn't necessarily capture the varying degrees to which
each individual function might be considered experimental.

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk      |  https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/  |  https://www.tindie.com/stores/leonerd/

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