in reply to Re^4: Nesting Functions
in thread Nesting Functions
not sure what you mean. Example?
> Also in perl one distinction is that non lexicals can be accessed by name (symref or symbols table) while lexicals can't. Python doesn't have that distinction.
AFAIK does Python have namespaces - well classes - like __BUILTINS__ or globals()['var'] to access such non-lexicals.
> Are you saying the names of elements in a language must match their implementation and not their behaviour?
I'm saying it has to match the semantic of the definition. From what I know have "lexical vars" been invented in lambda calculus.
I suppose they where first implemented in lisp.
> as you can't limit a variable to a scope except function (so a variable in a loop can be used outside of that loop)
Scoping rules are different, but please keep in mind that you need an extra "form" in lisp to build a lexical scope. (at least in elisp). So scopes are language depended.
But what matters here is the visibility of lexicals (or rather non-visibility outside a scope)
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Nesting Functions
by Eily (Monsignor) on Jul 19, 2019 at 14:23 UTC | |
by hippo (Archbishop) on Jul 19, 2019 at 14:38 UTC | |
by Anonymous Monk on Jul 21, 2019 at 22:32 UTC | |
by LanX (Saint) on Jul 19, 2019 at 14:39 UTC | |
by Eily (Monsignor) on Jul 19, 2019 at 14:58 UTC | |
by LanX (Saint) on Jul 19, 2019 at 15:11 UTC | |
by LanX (Saint) on Jul 19, 2019 at 22:42 UTC | |
Re^6: Nesting Functions
by choroba (Cardinal) on Jul 19, 2019 at 14:12 UTC | |
by LanX (Saint) on Jul 19, 2019 at 14:22 UTC |