3 ms·
Those are 3 distinct types in Clojure; unfortunately they have no equivalents in JavaScript, thus they become strings.
by chongli 13y ago
Those are 3 distinct types in Clojure; unfortunately they have no equivalents in JavaScript, thus they become strings.
- dhamidi 13y agoTo my knowledge, keywords are actually functions in Clojure, which do have an equivalent in JS. "Looks more like Clojure" seems like a good enough reason to me.
- adrusi 13y agoThey can be used as functions, but I think they're implemented differently for optimization. Could be wrong.
- i_s 13y agoKeywords implement many interfaces, function (IFn) being one of them. See this line in the clojure source code: public class Keyword implements IFn, Comparable, Named, Serializable, IHashEq https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Keyword.java#L24 https://github.com/clojure/clojure/blob/master/src/jvm/cloju...