I love Lisp. I think itâs the perfect language for a very wide variety of problems, that itâs powerful, easy to learn, and that it provides the perfect environment for what I call exploratory programming.
There are some downsides. One of the most annoying is that it attracts a huge number of people who havenât bothered to learn Lisp complaining about âparenthesisâ. âSo many parentheses! I canât read it. Why donât they just use braces like other languages?â
What these people fail to understand is that the Lisp âsyntaxâ is actually the parse tree for the code. That means, among other things, that those parenthesesâor some similar symbolâis absolutely necessary. Otherwise, you canât specify the parse tree.
Sure, it doesnât have to be that way. You can choose from any number of conventional languages that have compilers to build those parse trees for you, but if you want to write in Lisp youâre going to have to write explicit parse trees. The odd thing is that itâs actually easier to write the parse trees yourself. It means that the syntax of the language is very simple and easy to learn. There are no annoying precedence rules to remember nor a huge number of special symbols with their own syntax to remember
But some people just wonât accept the gift. They insist upon complaining about the parentheses and, even worse, proposing schemes to do away with them. The fact that the result would no longer be Lisp seems to escape them.
That brings us to the point of this post. Over at the Lisp subreddit, nderstand2grow is proposing yet another scheme to reduce those pesky parentheses. My first reaction on seeing it was, âOh dear God! Not again.â
Common Lisp and Elisp actually have a construct in the spirit of his scheme: the loop macro. The Loop macro is the subject of considerable controversy in the Lisp community and many Lispers, myself included, consider it a violation of the Lisp way. Yes, itâs powerful but it is, in the end, an escape from Lisp, much like an FFI.
I donât, by any means, insist that people write in Lisp but if you do, write in Lisp and stop trying to turn it into Pascal or whatever. We all know what DMR said about that.