|
|
|
|
|
by benas
2262 days ago
|
|
I have nothing against Clojure, but I agree with Donald Knuth who said: "Programs are meant to be read by humans and only incidentally for computers to execute." [1]. I could be wrong, but I don't find Clojure to be "simple" for humans to read (or write). Here is an example from the blog post: So let’s write a simple one. Let’s write the factorial function.
(defn fac [x] (if (= x 1) 1 (* x (fac (dec x)))))
Note the "simple one" here. I don't know for others, but this is not simple for me as a human to read, understand and reason about. For instance: if (= x 1)
As a human, I read this like "if equals x one", which does not translate to my natural language where I would say "if x equals one". So I need an additional mental effort to do the translation. This is not the case in other languages where "if x equals one" would be written like "if x = 1" or "if (x == 1)". If the gap between the natural language and programming language is big, it is difficult for a human to use that programming language. And for Clojure, this gap is big IMO.(I (wanted) (to learn ((some)) Clojure in the past) but [quickly] ([(realized it was (not) for me)])) [2]. [1]: https://news.ycombinator.com/item?id=16430751 [2]: https://twitter.com/b_e_n_a_s/status/1244417191556063234?s=2... |
|
This is missing semantics for morphology. Delimiters aren't strewn about randomly, they precisely delineate the AST.