Re:Pattern Matching and Tail Recursion in Emacs Lisp
by lispm on Friday November 25, 2022 @02:37AM
(#33740149)
It's unfamiliar to the beginner and could take also some "unlearning" of expectations how a program looks like and how to program.
But there are reasons for the syntax: it allows relatively easy language extensions. The mentioned PCASE macro extends the language with a pattern matching construct. Every user can write theses things. Directly in Lisp, without modifying the language itself - because it is already extensible.
Emacs Lisp has some well written extensions. I find the coding style of something like the PCASE extension to be quite readable, for me as a Lisp user. ;-)
But there are reasons for the syntax: it allows relatively easy language extensions. The mentioned PCASE macro extends the language with a pattern matching construct. Every user can write theses things. Directly in Lisp, without modifying the language itself - because it is already extensible.
The source for PCASE is here: https://github.com/emacs-mirror/emacs/blob/master/lisp/emacs...
Emacs Lisp has some well written extensions. I find the coding style of something like the PCASE extension to be quite readable, for me as a Lisp user. ;-)