2 ms·
Have you seen https://stevelosh.com/blog/2018/08/a-road-to-common-lisp/ https://stevelosh.com/blog/2018/08/a-road-to-common-lisp/ ? "Kludges" everywhere is appl
by Jach 2y ago
Have you seen https://stevelosh.com/blog/2018/08/a-road-to-common-lisp/ https://stevelosh.com/blog/2018/08/a-road-to-common-lisp/ ? "Kludges" everywhere is applicable. On the other hand, having a function like "row-major-aref" that allows accessing any multi-dimensional array as if it were one dimensional is "sweeter than the honeycomb".
I still think CL code can be beautiful. Norvig's in PAIP https://github.com/norvig/paip-lisp https://github.com/norvig/paip-lisp is nice.
As for the inside-out remark, while technically you do it for even basic syntax, you don't always exactly have to, and it's very convenient to not do. Clojure has its semi-famous arrow macro that lets you write things in a more sequential style, it exists in CL too, and there's always the venerable let* binding. e.g. 3 options:
(loop (print (eval (read))))
(-> (read) (eval) (print) (loop))
(loop
(let* ((r (read))
(e (eval r)))
(print e)))
And even the first one isn't that bad to read. For the really annoying cases like a lot of arithmetic, just use the reader macro from the 90s that lets you write in infix mode rather than complain how the quadratic equation is harder to read in prefix notation.