On Fri, Sep 14, 2018 at 04:15:02AM -0700, Todd Chester wrote: : Also, did you answer my question about "::" and did it : just go over my head?
The implication was that "::" didn't change, but the default package scoping of p5 that you're relying on is no longer the default in p6. : The p5 guys use to tell me "its lexiconical", meaning it was figured : out on the fly. (Took me forever to catch on.) Is that any : relation to your use of the word "lexical"? I would like to see a citation of this use of the word "lexiconical". In the first place, the word "lexiconical" has not been used in perl5-porters in living memory, and if had been used there, it is unlikely to have meant "figured out on the fly". : https://www.dictionary.com/browse/lexical?s=t : : adjective : : of or relating to the words or vocabulary of a language, : especially as distinguished from its grammatical and : syntactical aspects. : : of, relating to, or of the nature of a lexicon. The relationship of lexicons to lexical scoping here is a bit tenuous, but it goes something like this: Every scope in your program can define things local to that scope. When a scope does define something, it's creating a new lexicon of terms, like a private lingo or patois for a given workplace that no other workplace will understand. It is that set of private definitions (overlaid on all the definitions pulled in from larger scopes) that functions as a "dictionary" here. So when people say "lexically scoped", they mean there are multiple lexicons, and each symbol is looked in the nearest one that actually has a definition for the term. The whole point of "scoping" is to decide what is near, and what is far. So, for instance, you may have worked in a workplace or participated in a forum where the local lexicon of the "p5 guys" contained the word "lexiconical" with some kind of idiosyncratic meaning involving dynamic lookup. That term is not used in the larger p5 culture that way, so people outside that workplace or forum will not understand that idiosyncratic definition of "lexiconical", which seems to have nothing whatsoever to do with lexicons. Lexical scoping is not figured out on the fly; it's figured out while the code is compiling. You can have delayed compilation when you eval a string, of course, but then the fact that the lexical lookups are delayed is not a special feature of the lexicon; everything related to the compiler is delayed when you eval. "Figured out on the fly" is a feature of eval, not of lexicons. Now, all that being said, in p5 subroutines are looked up in packages, and packages are modifiable, so we do have to discover what to call "on the fly" in that case. But in p5 culture we never refer to packages as lexicons because that would confuse people. In Perl 6 culture we never mix them up either, but we also never put subs into packages by default. The reason Foo::bar notation doesn't work is because bar isn't in Foo anymore unless you explicitly put it there. Larry