Re:Why CoffeeScript Isn't the Answer
by z3phyr on Sunday March 30, 2014 @01:36PM
(#7497002)
Then, for sure, Clojurescript is the answer.
[ Parent
| on HN ]
Clojure is really hard for me to use, coming from a lisp background. The various special forms seem to sometimes want a list and sometimes want a vector and sometimes don't care. I've yet to find a way to keep track of that.
Anyone have a link to something from Rich mentioning why vectors are used in basic syntactic constructs? It's the one departure from its lisp roots that I couldn't figure out any motivation for.
I've never seen any explanation from Rich on the subject, but semantically speaking, vectors used in syntactic constructs are almost universally meant to denote binding forms. Let-bindings, loop-bindings, function parameters and the like all use vectors in the context of binding symbols to values.
I find that, having gotten used to the mental shortcut "square brackets == binding", the distinction makes it easier to read the "shape" of code from a very high level and get a general understanding of its meaning at a glance. YMMV.
Does it have a good interop? Does it require a big change in mindset? These are my questions. (Real questions, I've never used Clojure apart from some basic tutorials)
Yes and yes (it's probably arguable though: you need to export symbols to avoid getting them mangled by the google closure compiler)
But since the author dismissed Dart due to not being "true to javascript", I doubt that he'd be satisfied with it