Closed leonerd closed 2 years ago
Why it is lexically_export and not export_lexically? I think verb should be first.
Hmm i hadn't thought about that. I'm not fussed either way. We should probably make it whatever seems more consistent with other things.
Could also be export_lexical
. I'm not too bothered either way.
I am not so fluent in English so I don't know whether some way is preffered from the language point of view. But from what I saw in programming languages without function overloading there is a naming pattern like action_some_concretization. For unrelated illustration: In Perl you can call sort function with package function: sort numerically @arr. So for me export_lexically sounds more naturally. But this is just a suggestion, food for thought.
I'm for export
or lexport
to make things simpler
I'm for
export
orlexport
to make things simpler
I think export
is a bit too short for clarity. It doesn't express the lexical nature. I could imagine some sort of builtin function to tidy up the way we do symbolic package exports:
export_symbolically $caller, name => \&func, name2 => \&func2, ...;
I'm for
export
orlexport
to make things simplerI think
export
is a bit too short for clarity. It doesn't express the lexical nature. I could imagine some sort of builtin function to tidy up the way we do symbolic package exports:export_symbolically $caller, name => \&func, name2 => \&func2, ...;
Hmm, do you mean a function in addition to the proposed :export
attribute?
I'll add l_export
to my list of names.
There seems various thoughts on the name of this. I'm not overly attached to any of them so I think lets propose a vote on the various ideas. Use the "+1" thumbs-up reaction for voting on the following ideas.
Besides the name, is there any other concern anyone has?
VOTE: lexically_export
VOTE: export_lexically
VOTE: export_lexical
I'm sorry guys. I don't want to test your patience. But how about export_lex
and hypothetical export_sym
(which this RFC is not about)?
@ivrntsv
But how about
export_lex
and hypotheticalexport_sym
I'm not sure that lex
is sufficiently meaningful to new/casual readers, to work out what the thing is (Same as lexport
).
This is no longer the 1980s, with code stored on reels of tape or punched cards where every byte matters. We're allowed to spell words out in full now ;)
It seems export_lexical
is currently the vote-winner. I'm not entirely sure how I feel about a function named as a singular noun ("lexical") having the ability to create multiple lexicals, but nevertheless I'll update the spec for that.
As I see export_lexical
is preffered by voters. But that mean mixing verb and adjective. Or maybe in that case export is noun. It should be written lexical_export
then. I preffer to mix verb and adverb in export_lexically
. Maybe the short variant is the winner so I suggested export_lex
as variant. But I don't insist.
Addition: After some thought I see that lexical adjective plays well with exportable noun(s) that follow. Now I'm at peace. Thank you))
I can't get this thing out of my head. So one final (I wish) thought. export_as_lexical
(hypothetical export_as_symbol
). This as part will give understanding that something exportable will become a lexical variable (or a package symbol) on the user side. export_lexical
tells to export something lexical which is not true. Most of the time you export something global from a package.
Hmm.. that is true. It's not that the thing being exported is necessarily a lexical (indeed; most of the time for doing coderefs it probably won't be). It's that once exported, the new thing that is created is a lexical. So maybe the word as
should be part of its name.
On Mon, Jul 04, 2022 at 03:35:50PM -0700, Paul Evans wrote:
Hmm.. that is true. It's not that the thing being exported is necessarily a lexical (indeed; most of the time for doing coderefs it probably won't be). It's that once exported, the new thing that is created is a lexical. So maybe the word
as
should be part of its name.
'export_lexically' would correctly describe how the thing is being exported rather than what is being exported.
-- You never really learn to swear until you learn to drive.
@iabyn
'export_lexically' would correctly describe how the thing is being exported rather than what is being exported.
Indeed - is why I voted for that one in particular; though it seems export_lexical
currently has 7 votes to its 5. But perhaps this distinction is enough to sway it in favour anyway..?
Righty. Setlled on export_lexically
Why it is lexically_export and not export_lexically? I think verb should be first.