Re:Compiling a Lisp to x86-64: Let expressions
by sillysaurusx on Thursday October 01, 2020 @09:27PM
(#24657869)
Fewer parens. It was just a trivial example to illustrate the macro.
(lets (a b) (list 1 2) c (+ a 3) (d e f) (some-func a b c) (* d e f))
It destructures automatically. The equivalent traditional macro might look like
(destructuring-bind* [[(a b) (list 1 2)] [c (+ a 3)] [(d e f) (some-func a b c)]] (* d e f))
which is unreadable. And yeah, normally it's indented properly and yada-yada, and people use editor plugins like paredit to make it not such a pain to type, but still. It adds up.
(lets (a b) (list 1 2) c (+ a 3) (d e f) (some-func a b c) (* d e f))
It destructures automatically. The equivalent traditional macro might look like
(destructuring-bind* [[(a b) (list 1 2)] [c (+ a 3)] [(d e f) (some-func a b c)]] (* d e f))
which is unreadable. And yeah, normally it's indented properly and yada-yada, and people use editor plugins like paredit to make it not such a pain to type, but still. It adds up.