💾 Archived View for tilde.club › ~verdantmoss › lisp.gmi captured on 2023-01-29 at 03:53:54. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

Lisp

As someone who uses Emacs far too much, I do - as expected - have an opinion on Lisp, and I - as expected - quite like it. Prior to using Emacs I hadn't so much as touched a Lisp and had only a passing knowledge of functional programming (Haskell, specifically). To be perfectly honest, I learned Elisp (the dialect of Lisp used by Emacs) entirely by accident. It started when I copied a few configuration snippets from the internet. Then I wanted to modify them slightly, and I picked up a very primitive working knowledge of Elisp. Then I decided that I should probably learn a bit more as I used Emacs for increasingly more tasks, read the intro of one of the Elisp guides packaged with Emacs, got distracted, and never returned to said guide.

But that was enough to turn my poor working knowledge into a real, useful understanding. How can a few pages suddenly make me a mildly competent Lisp programmer? Such is the elegance of Lisp. I've heard before about it's elegance, how it revolutionises your understanding of programming, and other such claims by adherents of the faith. The thing is, Lisp /is/ a very elegant paradigm, one that is (despite the overflowing parenthesis) really quite nice. Elisp has been a particularly nice introduction to Lisp, seeing that Emacs is the ultimate environment for writing it - powerful introspection and instant documentation at a keypress is /really/, /really/ nice and something I desperately long for when writing in other languages.

For such straightforward syntax, Lisp is unreasonably powerful. The removal of statements, leaving only expressions - much like functional languages - is excellent as a tool for both simplifying syntax and the code written in it. Unlike Haskell, which while excellent I found to be overflowing with many (powerful!) syntactic options that can be used to achieve the same result, Lisp with it's s-expressions is /elegant/. Sure, you have to deal with all those parentheses, but even if you don't use powerful tools for manipulating s-exps (i.e. paredit), as I don't, I've found that simple paren-pair highlighting in your editor of choice is good enough.

Admittedly I'm yet to learn a second Lisp - Common Lisp seems like the most sensible choice, although I really do quite like the look of Fennel - but the striking elegance of Lisp as a paradigm is really quite nice, and something I wish I could write more often, even as someone who spends most of their work time reading C and ASM. That it still exists in some form of reasonably common use despite it's age speaks for itself.

last updated: 2022-11-06