4 ms·
In a system with dynamic scoping, you have access to variables which otherwise you might not. If it were written in scheme, it might be more difficult to know
by yoklov 15y ago
In a system with dynamic scoping, you have access to variables which otherwise you might not. If it were written in scheme, it might be more difficult to know how many buffers are currently open or some other text-editory value than it is in emacs lisp.
Interestingly, from what I've seen dynamic scoping hasn't hindered emacs lispers at all. They have some sort of variable naming system that is specific enough that confusion is fairly rare (I've never seen anybody talk about variable naming conflicts, at least). For example, the value of the (chosen randomly out of my .emacs) ``ido-auto-merge-work-directories-length'' variable seems unlikely to be changed accidentally.
That being said, Scheme/Guile have dynamic fluids which allow for the same sorts of things to be done. Personally, I feel like these would have to be used heavily in order to for a hypothetical lexically-scoped guile-based emacs to work, but maybe thats just because I feel like dynamic scope makes things easier to extend :p (at least, in this sort of program).
- p4bl0 15y agoIt seems dynamic scoping is not really an issue for Guile to host Emacs Lisp. See the paragraph from the README[1] of the current implementation: flet and flet*: --------------- These constructs behave exactly like let and let*, except that they bind the function slots rather than the value slots, and so make dynamic scoping available for functions, too. To me this sounds like the dynamic scoping issue has already been solved. [1] http://git.savannah.gnu.org/gitweb/?p=guile.git;a=blob;f=module/language/elisp/README;hb=HEAD http://git.savannah.gnu.org/gitweb/?p=guile.git;a=blob;f=mod...
- gruseom 15y agoNo, that's about writing an Elisp compiler in Guile. Yoklov was talking whether Guile itself is as suitable an extension langauge as Elisp.
- p4bl0 15y agoRight but what if this compiler could JIT elisp to the Guile VM? It would use Guile but still be elisp compatible. Am I wrong?
- gruseom 15y agoAs far as I know (but I'm not the person to ask), their goal is to swap a new (Guile-based) Elisp implementation into Emacs that is 100% compatible with existing programs. That seems like a sine qua non if their plan is to have any chance.