3 ms·
Why is it nicer than (+ 1 2). What is gained from an extra layer of indirection?
by TylerE 6y ago
Why is it nicer than (+ 1 2).
What is gained from an extra layer of indirection?
- sillysaurusx 6y agoFewer 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.