Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EXPERIMENT] the builtin:: namespace #19764

Open
rjbs opened this issue May 21, 2022 · 3 comments
Open

[EXPERIMENT] the builtin:: namespace #19764

rjbs opened this issue May 21, 2022 · 3 comments
Labels
experiment ticket tracking an active experiment

Comments

@rjbs
Copy link
Member

rjbs commented May 21, 2022

In Perl 5.36.0, we added the builtin namespace for new functions that are not always available in every namespace. (They must be imported or called by fully-qualified name.)

@rjbs rjbs added the experiment ticket tracking an active experiment label May 21, 2022
@rwp0
Copy link
Contributor

rwp0 commented May 21, 2022

> perl -E 'say for keys %builtin::'
trim
weaken
refaddr
import
is_weak
reftype
created_as_string
is_bool
floor
unweaken
true
ceil
created_as_number
blessed
false
indexed

that's how to list them for those who wonder what functions are available in the new namespace

@leonerd
Copy link
Contributor

leonerd commented Jun 28, 2022

The module itself is considered experimental, as is additionally every individual function that it shipped with. Those functions are:

true false is_bool
weaken unweaken is_weak
blessed refaddr reftype
created_as_string created_as_number
ceil floor
trim
indexed

No individual function can be made non-experimental before the builtin namespace mechanism itself has been. However, it may turn out that individual functions can have a longer experimental status once the overall mechanism and most of its functions are declared stable. If that becomes the case, new Experiment issues should be created for each of those functions.

Any newly-added functions should be considered as separate experiments beyond this, with their own lifetimes.

@leonerd
Copy link
Contributor

leonerd commented Jun 28, 2022

Additional abilities that would need adding before deëxperimentalizing:

  • builtin bundles - a.la. use builtin ':v5.37'
  • integration with use VERSION - use v5.37 to imply use builtin ':v5.37'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experiment ticket tracking an active experiment
Projects
None yet
Development

No branches or pull requests

3 participants