4 ms·
Indeed, despite Lisp's vaunted expressiveness, in many flavors of Lisp you'd have to write something about as complicated. Common Lisp lets you redefine syntax
by xyzzyz 14y ago
Indeed, despite Lisp's vaunted expressiveness, in many flavors of Lisp you'd have to write something about as complicated.
Common Lisp lets you redefine syntax to support equally easy function composition. You can even get rid of the parentheses syntax altogether and switch to Haskell syntax. People don't do it, though, because Common Lisp is not a functional programming language, and that also would be against Lisp nature.
I don't know if Clojure has reader macros that are as expressive as Common Lisp ones (I'd be happy to learn the answer from some Clojure hacker). Other Lisps are either very old or domain specific.
- andrewflnr 14y agoClojure has a function (comp ...) that composes an arbitrary number of functions, and the macros -> and ->> that sort of pipe a value through a list of expressions. (Still new to clojure myself)
- ggchappell 14y agoAh, I wondered if there would be a reply like this. Thus my weasel-worded statement ("... many flavors ...") <sheepish grin>. Thanks for the info.