🥩 Red Meat Friday: Parenthesis In Lisp

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.

This entry was posted in General and tagged , . Bookmark the permalink.