4 ms·
Hmm, interesting article. I think I disagree with some arguments though. Eg I think one can make a bit of a lisp curse argument when the alternative is C, but I
by dan-robertson 4y ago
Hmm, interesting article. I think I disagree with some arguments though. Eg I think one can make a bit of a lisp curse argument when the alternative is C, but I think that mostly doesn’t apply when comparing with JavaScript. Sure there are janky features but modern JavaScript is a pretty nice language.
Indeed, I think there are deficiencies in elisp that make Emacs Emacs. In particular there’s one big namespace, no modules, and not really any hidden state (you could let over defun with lexical scoping turned on but unlike JS where the module system is somewhat modelled on the old immediately-invoked-anonymous-function thing, no one does that). This then means that any extension can mess with any other extension. Elisp has features that make this work better, eg buffer-local variables, dynamic scoping (of globals), and advice. What in Emacs is implemented with buffer local variables is likely in a newly designed system to be some private-to-the-extension object associated to buffers / weak hash table mapping buffers to data.
I think Emacs-style extensibility also makes things hard because it is easy for two extensions to interfere unintentionally.
I somewhat agree with the idea of ‘barrierless extension’ but not for the reasons given in the OP – that eval exists.
I would say some differences are:
- many Emacs defaults are old, weird, or wrong. It seems mostly hard for them to be changed. Many packages also require much custom configuration. VS code started with more familiar defaults, no legacy of terminal interfaces, and has product people willing to change and improve defaults and generally set direction.
- Emacs is designed to be hacked on. The community around Emacs want things to be hackable, eg a popular way of installing third-party packages, straight, has features to support user-modified versions of packages. Also the language/environment exposes lots of extension points (hooks, parent modes, configuration in accessible global/buffer-local variables, advice). It seems that VSCode doesn’t have this. I suspect that bugs for VSCode are less common than for Emacs setups with a bunch of extensions (giving Emacs more VSCode-like features), but I also suspect that most Emacs bugs may be relatively easily debugged and fixed in a way that isn’t true for VSCode.
- JohnFen 4y ago> Emacs is designed to be hacked on. I don't consider VSCode to be in the same family as Emacs, let alone a spiritual successor, and really this is the sole reason why. But, full disclosure, while I've used (and use) Emacs quite a bit, I'm really a vi guy. As to the defaults, yes, you'll want to change a bunch. But personally, I find that's no less true for VSCode or most other such beasties.
- tikhonj 4y ago> it is easy for two extensions to interfere unintentionally This is true in theory but, in two decades of pulling in lots of extensions and writing lots of custom Elisp, I've ≈never seen extensions interfering with each other. I've found the vast majority of Elisp code to be surprisingly robust and pleasant to work with despite flaunting software engineering "best practices". It's gotten me to fundamentally rethink what it means to write high-quality code! > many Emacs defaults are old, weird, or wrong This is definitely true. Hopefully distributions like Spacemacs and Doom Emacs help with this, but I expect base Emacs is always going to be a bit wonky :P
- m463 4y agolook, I know emacs has higher limits in terms of ultimate functionality with lisp, but sometimes I truly wish the core language of emacs was python
- yakubin 4y ago> Sure there are janky features but modern JavaScript is a pretty nice language. “Janky” is an understatement. Recently I’ve rediscovered that in JavaScript comparing two arrays with == and === returns false, unless they’re the same object. At the same time there is no built-in function to correctly compare arrays for equality. This is a C-level foot gun. Not the only one I might add.