2 ms·
I don't know Emacs Lisp but didn't RMS just said in his talk that they changed the default to lexical scoping?
by gosukiwi 4y ago
I don't know Emacs Lisp but didn't RMS just said in his talk that they changed the default to lexical scoping?
- klibertp 4y agoReally? (Didn't have the time to listen to the talk.) I'd like to know if it was somehow measured, ie. how much of the Elisp code is still not adjusted to use lexical scoping and how much of such code would break by switching to lexical scoping. You can still opt-in to dynamic scoping by using defvar (and it's been a standard practice since forever), so the only scenario where old code would break would be where a called function accesses local variables from the calling function, like you would do in TCL with upvalue. I suspect that's a pretty small percentage of all the Elisp code in the wild; plus, this would be caught by the byte compiler, without the need to run the offending code. In any case: the change of the default is welcome, though not very important, as we've all already got used to putting `lexical-binding: t` at the top of every Elisp file :)