Re:Why I Write CSS in JavaScript
by gnulinux on Monday February 18, 2019 @02:34PM
(#19193573)
Emacs lisp is pretty much like that. Nowadays it does support semantic scoping but lexical scoping is still very useful.
[ Parent
| on HN ]
Re:Why I Write CSS in JavaScript
by dan-robertson on Monday February 18, 2019 @03:11PM
(#19193949)
I 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???).