Skip to content

Comment on Haskell vs Clojure syntax

Comments

With Haskell you get to learn the crazy syntax of the standard. With Clojure you get to learn the crazy syntax of whatever program you're looking at.

Not really. The culture with Clojure is that macros have reasonably long, descriptive English names. You don't have to go digging in the documentation or source to figure out what a macro does. Haskell, meanwhile, inherits mathematical culture and abuses operator overloading to the point where you can't figure out anything code is doing without looking at the source.

I'd argue that being able to define custom operators is far, far, worse for readability than being able to define custom syntax that's invoked by an English-language macro.

Well it was sort of a lisp macro joke. ;)

It's more like with Clojure you're learning the "crazy" Lisp syntax. Sure Clojure has some specifities like #(...) and the -> macro but it's mostly the minimal Lisp syntax.

Learning Clojure has helped me learn elisp too (no more #{} and {} in elisp but the syntax is quite similar).

The one thing I noticed after learning Clojure is that suddenly it became very easy to learn all these Common Lisp and elisp blog posts containing code.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.