4 ms·
> so traditionally Emacs Lisp scripts have super-long-variable-names-in-order-to-avoid-collisions I don't think dynamic scoping is the only reason for this.
by catalogia 7y ago
> so traditionally Emacs Lisp scripts have super-long-variable-names-in-order-to-avoid-collisions
I don't think dynamic scoping is the only reason for this. Scheme has lexical scoping yet long-identifier-names are popular with scheme as well.
Personally I prefer lexical scoping with long-identifier-names. I find it more pleasant to read. And with modern auto-completion systems, it's no longer inconvenient to write code like that.
- smabie 7y agoAnd the commonality between elisp and scheme: a lack of a module/namespacing system.
- catalogia 7y agoThat's not true of racket though, and in racket long-identifiers are still popular.
- namelosw 7y agoYes but for dynamically scoped languages you have to name it even longer. Because in Scheme there are safe variables in closures so it can just named as <already-very-long-function-name>, while in Emacs Lisp it's literally leaking everywhere so it need to be <plugin-name>-<feature-name>-<sub-feature-name>-<repeat-the-feature-name-game-for-a-while>-<and-eventually-the-already-very-long-function-name> instead.