2 ms·
Not sure if I understand this complain, I was a Clojure programmer and from what I remember most of the constructions in Clojure ARE defined as macros or functi
by kokada 2y ago
Not sure if I understand this complain, I was a Clojure programmer and from what I remember most of the constructions in Clojure ARE defined as macros or functions.
Special forms (that are the Clojure "keywords") are small enough in number that at one time in my carrer I used to know all of them: https://clojure.org/reference/special_forms https://clojure.org/reference/special_forms.
> and if it’s a choice between case, condp, or cond
For example, those are all macros:
- case: https://github.com/clojure/clojure/blob/ce55092f2b2f5481d25cff6205470c1335760ef6/src/clj/clojure/core.clj#L6748 https://github.com/clojure/clojure/blob/ce55092f2b2f5481d25c...
- condp: https://github.com/clojure/clojure/blob/ce55092f2b2f5481d25cff6205470c1335760ef6/src/clj/clojure/core.clj#L6394 https://github.com/clojure/clojure/blob/ce55092f2b2f5481d25c...
- cond: https://github.com/clojure/clojure/blob/ce55092f2b2f5481d25cff6205470c1335760ef6/src/clj/clojure/core.clj#L6748 https://github.com/clojure/clojure/blob/ce55092f2b2f5481d25c...
> Finally, by not being a builtin, it doesn’t really feel blessed as a language feature
I am also quite not sure about this criticism. Lots of things that are heavily adopt by Clojure community are not built-ins but are in the `core` namespace. Probably the most (in)famous example is `core.specs`, but for example both `core.async` and `core.logic` are well used and they're still not built-ins.