Closed leonerd closed 1 year ago
Then we rename use
as use_module
, and require
to require_module
(and break everything), not sure why there are objections since it will just make it stand out from the rest of the group.
use and require have significant precedent, one might say moreso than any other part of the language. load
is a meaningless term to Perl coders. the cases are not at all comparable or related.
This is about the not-yet-written builtin::load
function, which we feel should be called builtin::load_module
, to live with the other builtins.
Yes, I know. If its fitting for builtin::
to have keywords with harder names, let it be so.
But generally having one-word keywords is better to have in core IMHO matching the other keywords of the language (it was designed with that in mind I believe).
@rwp0
Yes, I know. If its fitting for builtin:: to have keywords with harder names, let it be so.
Who knows - maybe one day we'll add a builtin::load_json
or whatever; at which point having named this load_module
rather than simply load
would feel like much of an improvement.
I just want to mention that we have traditionally reserved underscores for user-defined names; perl core functions don’t use underscores.
this isn't a core keyword, it's a function in the builtin namespace
Yeah, whatever it's called, naming disputes shouldn't hinder the development. If the default load
is too ambiguous, let it be load_module
. Btw there's already keywords like export_lexically
, so we can live with it 🙂
@rjbs @book - thoughts?
I have no issue with the load_module
name.
I think load is better, but really don't care. Like: how about we do the important work of making this work, and then can polish the name as needed.
Merged so that it's not an outstanding question!
I then discovered this Perl API C function:
https://perldoc.perl.org/perlapi#load_module
That probably will be a front-end to this one.
Then the name is not so bad I think.
Objections were raised at the rather short and inspecific
load
; suggested that we rename this toload_module
.