3 ms·
The more I use Clojure at work, the more I tolerate the elisp side of things. I've written a couple little major modes (though not to any great standard of qual
by microcolonel 7y ago
The more I use Clojure at work, the more I tolerate the elisp side of things. I've written a couple little major modes (though not to any great standard of quality) and elisp is indeed pretty crap, but usually adequate. I think the ideal Emacs lisp successor would be a Clojure derivative, with the buffer represented as a persistent trie datastructure like other things are in Clojure. Maybe the buffers could be disjointed from the presentation a bit, and we could have strictly AST-driven major modes, rather than the (admittedly quite usable) hack that is paredit.
- Myrmornis 7y ago> Maybe the buffers could be disjointed from the presentation a bit, and we could have strictly AST-driven major modes Yes, good point, agree that would be a very positive direction. > elisp is indeed pretty crap Ah, I've been enjoying it a lot recently :) But I don't have an excuse to write clojure and I certainly recognize that that's a much more sophisticated thing. What are your biggest criticisms of elisp? Mine is basically that the naming of functions in the standard library is terrible. Also: I'm still a bit confused about whether I should be using lexical binding (probably my fault for not thinking about it hard enough); the situation with threading is a little obscure; on the face of it threads in now exist in the elisp API, but are they not fully featured in some aspect?
- microcolonel 7y agoMy main gripe with elisp is the default to dynamic binding, which is in most systems almost never what you want. In Emacs, the dynamic bindings are used for more productive reasons than in generalized programs, but they should still be a conscious choice. When it comes to threads, the elisp datastructures are inadequate because they are mutable. It is possible to write functioning threaded programs with shared mutable state, but for the most part, it is going to introduce the kinds of bugs that people solve one of per week on a six figure salary.
- yyoncho 7y agoUse dash/s/f/ . seq is fine too but dash is pretty much clojure port.
- microcolonel 7y agoDash is a very cool library! Though it only really does seq. The Clojure persistent vectors, hash maps, and hash sets are all very powerful. CHAMP is often an improvement on HAMT. I think the text buffer as a persistent vector of extended grapheme clusters is an interesting thought.