Re:A Little Clojure
by 2019-nCoV on Wednesday April 08, 2020 @02:04AM
(#22810450)
The profound insight is that your example demonstrates almost all of Clojure's syntax.
[ Parent
| on HN ]
Re:A Little Clojure
by yakshaving_jgt on Wednesday April 08, 2020 @02:42AM
(#22810578)
That in and of itself isn't particularly useful or meaningful. There are languages with even less syntax than Clojure, but that doesn't necessarily make them more practical or ergonomic.
Exactly. Clojure's syntax is as simple as pragmatically possible, but not simpler.
Re:A Little Clojure
by yakshaving_jgt on Wednesday April 08, 2020 @03:07AM
(#22810675)
…and yet, still more visually noisy than the same function written in Haskell.
Not that it actually matters, of course.
> Not that it actually matters, of course.
It matters if you care about consistency. After learning the simplicity of lisp, all other use of special symbols for infix syntax strikes me as arbitrary and fiddly. Arbitrary choices should be left to library (function and macro) developers, I appreciate that the core language is simple, extensible, and consistent.
And yet anything more substantial than a single-line function clearly demonstrates the breadth of syntax required in Haskell comparatively, e.g. https://gist.github.com/honza/5897359
Re:A Little Clojure
by yakshaving_jgt on Wednesday April 08, 2020 @03:36AM
(#22810813)
Those two snippets are not equivalent. If you were trying to make an argument in good faith, you would have read the code properly and seen that for yourself, and/or read the comments below the snippets which point this out and link to a further explanation.