I would appreciate a little bit more detail here so that the article can be corrected. Could you point to which dangling parens need to be fixed?
(defun plus (x y)
(+ x y)
)
instead of this: (defun plus (x y)
(+ x y))
It suggests the author tires to balance parens manually/visually rather than using a proper editor mode. An understandable and common mistake of a newbie, but looks bad when you are writing a tutorial. (defun main
()
(format t "Hello world")
)
Should be (defun main ()
(format t "Hello world"))
The lisp community has very well established formatting conventions. You pretty much never see closing parens on their own line like this except when reading code written by beginners (or some special cases like package export lists for example, where one might want to leave the list "open" for adding new symbols, similar to a trailing comma in some other languages).Why is that? Space efficiency? As an outsider, I find the "wrong" example more readable.
It's like bicycle riding. As a beginner one thinks those supports wheels at the sides of the bicycle are absolutely necessary. One is constantly struggling to keep upright. Once you can ride a bike without them, one asks if they were ever necessary. Then one never thinks consciously about keeping balance.