Why Does EmacsLisp Suck?
EmacsLisp faces criticism for lacking modern features like lexical scoping and multithreading, relying on global state, and having cumbersome APIs, while users are divided on the need for reform.
Read original articleThe discussion on EmacsLisp (Elisp) highlights various criticisms and limitations perceived by users and developers. Many long-time Emacs users express frustration with Elisp, citing its lack of features found in other programming languages, such as lexical scoping, encapsulation, and multithreading. Critics argue that Elisp's design is outdated, with a reliance on global state and mutable data structures, which can lead to errors and inefficiencies. The absence of a robust object-oriented system and modern programming paradigms further compounds these issues. Additionally, the Emacs APIs are often described as cumbersome, lacking the elegance and functionality of more contemporary programming environments. Despite these criticisms, the community remains divided on the necessity of reforming Elisp, with some users valuing its historical context and integration within Emacs. The debate raises questions about the future of Emacs as a development platform versus its primary role as an extensible text editor. Ultimately, while there is a desire for improvement, many users are hesitant to overhaul a system that has been foundational to their workflows for decades.
- EmacsLisp is criticized for lacking modern programming features like lexical scoping and multithreading.
- The design of EmacsLisp relies heavily on global state, leading to potential errors and inefficiencies.
- Many users appreciate Emacs for its historical context and integration, despite its limitations.
- There is a divide in the community regarding the need to reform or replace EmacsLisp.
- The discussion reflects broader concerns about Emacs's role as a development platform versus a text editor.
Related
Avoiding Emacs Bankruptcy
Avoid "Emacs bankruptcy" by choosing efficient packages, deleting unnecessary configurations, and focusing on Emacs's core benefits. Prioritize power-to-weight ratio to prevent slowdowns and maintenance issues. Regularly reassess for a streamlined setup.
It's all up for grabs, compound with glue
The article explores Emacs customization using elisp, emphasizing combining utilities like symbol-overlay and multiple-cursors for enhanced workflow efficiency. It also mentions a new blogging service at lmno.lol.
It's all up for grabs, compound with glue
The article explores Emacs customization using elisp, emphasizing combining utilities for efficiency. Integrating symbol-overlay and multiple-cursors enhances workflow by streamlining tasks like symbol renaming. Users modify elisp functions in Emacs for desired features. A new blogging service at lmno.lol is mentioned.
Emacs development charts, 10×10%
Efforts to reduce Emacs bugs have led to a 45% decrease, with a focus on encouraging contributions from casual developers. The upcoming Emacs 28 release promises significant updates and improvements.
Ask HN: Why do people say "Lisp has no syntax"? It has infinite syntax
The author discusses Lisp's syntax, highlighting its list-based structure and challenges with constructs like `cond`. They conclude that Lisp's complexity resembles other languages, despite its unique features.
- Some users defend Emacs Lisp, praising its integration with Emacs and its utility for scripting within the editor.
- Criticism focuses on its reliance on global state, cumbersome APIs, and the challenges posed by its stateful nature.
- There is a call for modern features like multithreading and better data handling, with some users expressing frustration over the learning curve associated with its unique data model.
- Many users appreciate the convenience of live coding and automation in Emacs Lisp, despite acknowledging its limitations compared to other languages.
- Overall, there is a divide between those who value Emacs Lisp for its specific use case and those who seek broader improvements to make it more versatile.
I have hacked a considerable amount in both Elisp and CL and I can state that I actually prefer the way Elisp does some things over the way Common Lisp does--this is not to say that CL does things the wrong way--the matter is that they have different purposes. Emacs combined with Elisp in itself constitutes a complete programming system; all of its components are designed around it.
The language being integrated into Emacs makes writing Elisp programs a very fluid and intuitive experience: things like the fact that the documentation and the place where a function was defined is available at any time makes /understanding/ the system easy, and the actual documentation itself is often quite well written, and the Info manuals will most often explain everything you need to know about a package. Common Lisp+SLIME shares some of this convenience, but not to the extent that Elisp truly does.
Certain points like the fact that Emacs isn't multithreaded are thrown around by people who don't have the intuition that multithreading isn't the right thing for a lot of applications. The added complexity that multithreading would add to Emacs would seriously outweigh the usefulness it would provide. Emacs already has a decent process model, and having to deal with only a single shared state makes programs much cleaner.
At the very least if it all comes down to a dick measuring contest, the base GNU Emacs provides 100000000x more utility in its packages in a fraction of the memory space than VS code or Vim ever will. Emacs has its fair share of killer apps like Magit that provide such a clean interface to something that it makes using it worth it for that alone.
Instead of returning a data structure of the match results (eg from a call to match-string), the match results are mutated in global memory and accessed in separate function calls. This is both less functional in style and more error prone. For example, if save-match-data is not used appropriately, then library functions can trample on the match data which a higher level function is in the middle of using.
But in some other parts it reads like two or more personalities stuck in the same body shouting at each other using the same mouth: EmacsLisp Isn't Scheme
This, from my highly unscientific sample, is far and away the most popular reason EmacsLisp sucks. Well, that’s good to know. EmacsLisp is also not Perl, or COBOL, or IBM 1130 assembler, or a bicycle, or an orange. Thanks for the help!
The Emacs data model sucks. There are APIs that do who-knows-what combined with your personal extensions that modify behaviour who-knows-how, figuring out how to describe UI components is no fun, text editing is surprisingly hard from a programmers perspective, there are decades of accumulated different ways of doing things and it is unclear where to start or what has been obsoleted. The names made sense in the 70s but unfortunately it is 2024 and "Windows" means something different now. I wouldn't even exactly blame Emacs for any of this since some of it seems to be essential complexity of the domain.
EDIT Example, picked completely at random:
https://github.com/clojure-emacs/cider/tree/master/dev
(defun cider-tramp-prefix (&optional buffer)
"Use the filename for BUFFER to determine a tramp prefix.
Defaults to the current buffer. Return the tramp prefix, or nil
if BUFFER is local."
(let* ((buffer (or buffer (current-buffer)))
(name (or (buffer-file-name buffer)
(with-current-buffer buffer
default-directory))))
(when (tramp-tramp-file-p name)
(with-parsed-tramp-file-name name v
(with-no-warnings
(cider-make-tramp-prefix v-method v-user v-host v-port))))))
Here is a random function from CIDER. The code is simple enough, the lisp is no problem. Immediately we see we're interacting from one extension to another, have to understand Emacs buffers, need to know how warnings are displayed, have to understand parsing as a domain, and appear to have a network involved. That is a lot of work to debug one function when something is misbehaving. Not an unreasonable situation, but nonetheless a barrier. Then on top of that I have to go look up what let* is and why it is presumably different from let. One more thing I don't want to do. Emacs lisp sucks.EDITEDIT Tramp isn't an extension, it is part of core emacs. We live and learn.
EDITEDITEDIT Spoke too quickly, it looks like it is a GNU-supported extension. This is the sort of trivia that got me using Doom Emacs.
I take great care with my VSCode extensions and their configuration. I likewise take great care with neovim and having it set up properly.
Modern Emacs Lisp is easily the best environment among my daily drivers for interacting with my editor in real time.
Of anything modern I only know Zed a little: Zed in theory might be better than Emacs.
Outside of maybe Zed, which I haven’t mastered, Emacs Lisp is bar nothing the best tool-making tool for serious hackers.
There are some surprises. And I do think common lisp has a lot of better parts. But, at the end of the day I find elisp fine for a scripting like language. And I love how accessible every line of elisp in my machine is.
Libraries that help with that, even though the major underlying structure isn't immutable data structures make Emacs Lisp bearable are: s.el, ht.el, dash.el It would be great if there was namespacing and less global state pollution.
Of course if you want to integrate with the rest of the Emacs ecosystem and you want some libraries that help you out make things nice means learning a whole different ballgame. Like wanting to use the great transient.el. That's super stateful and based on eieio.el. (Although transient.el is relatively good about hiding that behind a good API surface.)
Overall, even though I wish it was based on a functional core and Clojure's immutable data structure, concurrency, namespacing and its great EDN reader, I just accept the pragmatism on the human scale that if I want a great text based interface that interacts with the rest of my text driven workflow Emacs is a good choice and Emacs Lisp is acceptable.
At least there's the "rx" DSL as an alternative.
I actually get a lot of utility out of eww, it's not just a novelty for me. I can browse online documentation without a DM, or if I do have a DM, without moving my hand to the mouse. It's not just a novelty.
It is getting increasingly difficult to use; much like emacs the web has also transitioned from its original intention (hypertext documents) to a bloated app development platform and it's increasingly unfriendly and difficult to use with simple browsers. Even so, there are still websites worth visiting that are usable from trivial browsers as long as you avoid the many apps masquerading as webpages.
Such poppycock. Clearly marking functions with side effects as such is not stigmatization, it's common sense. Don't take the sloppiness of other language cultures for the norm, although statistically it may well be. Too many people already think procedural object soup is how things should be.
Related
Avoiding Emacs Bankruptcy
Avoid "Emacs bankruptcy" by choosing efficient packages, deleting unnecessary configurations, and focusing on Emacs's core benefits. Prioritize power-to-weight ratio to prevent slowdowns and maintenance issues. Regularly reassess for a streamlined setup.
It's all up for grabs, compound with glue
The article explores Emacs customization using elisp, emphasizing combining utilities like symbol-overlay and multiple-cursors for enhanced workflow efficiency. It also mentions a new blogging service at lmno.lol.
It's all up for grabs, compound with glue
The article explores Emacs customization using elisp, emphasizing combining utilities for efficiency. Integrating symbol-overlay and multiple-cursors enhances workflow by streamlining tasks like symbol renaming. Users modify elisp functions in Emacs for desired features. A new blogging service at lmno.lol is mentioned.
Emacs development charts, 10×10%
Efforts to reduce Emacs bugs have led to a 45% decrease, with a focus on encouraging contributions from casual developers. The upcoming Emacs 28 release promises significant updates and improvements.
Ask HN: Why do people say "Lisp has no syntax"? It has infinite syntax
The author discusses Lisp's syntax, highlighting its list-based structure and challenges with constructs like `cond`. They conclude that Lisp's complexity resembles other languages, despite its unique features.