by microcolonel · 6y ago · 0 comments
The biggest problems with Emacs, to me, are the rendering performance, the lack of sufficient threading, the default keyboard-accessible windowing commands, and Elisp being unergonomic and sad.
The course I'd chart for an ideal Emacs would be rendering with something like Alacritty†, some default windowing commands similar to tmux, and phasing out Elisp in favour of a Clojure dialect; the last bit would help a lot with introducing some basic sources of concurrency.
† Plus smooth scrolling surfaces, since a text editor generally does not have enough surfaces that the memory overhead of tiled surfaces is a serious issue like it is for general-purpose renderers like web browsers.
For instance, the global namespace is great to play with and learn commands in the scratch buffer. Also the custom datastructures and generally the emacs lisp abstractions around editing are a joy to use.
I agree though that the rendering is too old fashioned. I'd love for Emacs to get smooth, animated scrolling instead of that tty-esque line-by-line movement of the text. That really makes it hard to keep track when scrolling throught large documents.
Namespaces for vars and functions being not a language feature is inconvenient. Unless you are using fakespace or intern-symbol (it seems hardly anyone does), every symbol in your program needs to include its namespace information in order to avoid it being accidentally invoked by somebody else, or accidentally convincing somebody that it's part of the base distribution.
In Clojure, it's many little things:
Keywords are callable, allowing you to evaluate a keyword on an associative collection like hash-map, or traverse, in an obvious and intuitive way, into a nested associative structure with the threading macros "->" and "->>".
The default data structures are fast (for what they are) and hard to misuse: unless you ask politely, you are not going to mutate something your function was passed passed without noticing. seq, the interface for sequences (vectors, lists, pairs from an associative structure), pairs well with destructuring in let and macros/syntax that does binding.
Things like 'let' don't use more parentheses than necessary, which has a greater impact on readability than you'd think. The use of vector syntax for bindings rather than list syntax adds a little bit of syntactic texture that makes reading programs more ergonomic.
I think Clojure may not be as unfamiliar as it seems at first to a person who's written other lisps before, but I have yet to meet somebody who prefers the experience of writing Scheme or Common Lisp to Clojure; nor anyone who prefers Elisp to Common Lisp.
;;; -*- lexical-binding: t -*-
isn't present until Emacs 24. After all these years.