4 ms·
Emacs lisp is pretty much like that. Nowadays it does support semantic scoping but lexical scoping is still very useful.
by gnulinux 8y ago
Emacs lisp is pretty much like that. Nowadays it does support semantic scoping but lexical scoping is still very useful.
- dan-robertson 8y agoI don’t really understand this comment. Emacs lisp always had dynamic scoping, which is a bit more than just global scope because you aren’t quite stomping on top of other variable bindings. You get resetting your bindings to what they were before you started for free and you don’t need to worry about nonlocal exits. Emacs lisp also has macros and gensym to avoid some of the pain of name clashes. Emacs lisp also has lexical scoping. It optionally had it for a long time using cl.el with lexical-let and friends. It now has it as a file-local variable read by the compiler/interpreter. I also don’t understand what you’ve written at all. You say “Nowadays it does support semantic scoping” but semantic scoping isn’t really a thing (as you next write lexical scoping, I assume you mean dynamic scoping), but the words “nowadays,” “but,” and “still” imply that you are talking about the new kind of scoping (ie lexical) and comparing with the old (dynamic, which you cal lexical???).
- b3n 8y agoIt's part of what makes Emacs so easy to customize on-the-fly.