(defn fac [x]
(if (= x 1)
1
(* x (fac (dec x)))))
> (I (wanted) (to learn ((some)) Clojure in the past) but [quickly] ([(realized it was (not) for me)]))This is missing semantics for morphology. Delimiters aren't strewn about randomly, they precisely delineate the AST.
(state-claim
(but
(past-tense
(desire (learn me clojure)))
(past-tense
(realize me (not (good-fit? me clojure))))))I'm not sure that follows from the original claim at all.
Mathematics has plenty of problems in when it comes to obscure terminology and regrettable notations, yet still vast numbers of people prefer the conciseness and precision of mathematics to using natural language when they want to discuss concepts in science, engineering, programming, etc.
At some point, if you're going to work in a technical field, you're going to need terminology and notation to match. Newbies to the field need to learn those before they can understand what is being said "naturally". The alternative is to attempt to dumb everything down to the point where newbies can understand it straight away but, assuming it is even possible, this risks losing a lot of effectiveness in communications between everyone who does have more experience.
[1]: https://en.wikipedia.org/wiki/Non-English-based_programming_...
Well, isn't that part of the premise we're debating?
Mathematical papers and books tend to have the advantages of dealing with only a handful of concepts at any given time, and of presenting their mathematical content in relatively small doses, both of which allow concise notation to remain both unambiguous and accessible enough to be useful. Anything other than the smallest programs probably do not enjoy the same advantages, so it makes sense that programmers tend to use longer names for entities that are relevant over a larger area. However, this argument still allows for short names to be used in programs as long as the scope is also small, and it says nothing at all about the relevance of natural language for representing programming language constructs.
We have some experience with programming languages that do try to read very much as natural human language. COBOL is probably the most famous example, and in that language even basic mathematical concepts like comparisons can be written out in words. We don't write much COBOL today, and it's hard to believe that the verbosity isn't a contributing factor in that.
* "Is this equals to that?" and not "is equals this that?"
* "Is this bigger than that?" and not "is bigger this that?"
And this is regardless of the language (be it English or whatever, see https://news.ycombinator.com/item?id=22811168). I'm not going to debate this to death, so feel free to disagree. Again, I have nothing against Clojure, I'm just trying to argue in a constructive way. (if (= a b c) true)
In JS it looks like this: if (a == b && b == c) return true;
Let’s build an even bigger one! Clojure: (if (or (= a b c)
(not= d e))
true)
And in JS: if ((a == b && b == c)
|| d != e)
return true;
More verbose, contains some weird symbols, and I’m not sure that my line breaks are helping anybody.Wanna see if an “array” is full of the same value?
(apply = [2 2 2])
In JS: [2, 2, 2].every( (val, i, arr) => val === arr[0] )
These are not pathological cases.English is not all natural languages. Verb-subject-object is the 3rd most common ordering in human languages[1]. Infix is not the only mathematical notation either[2]. I think we all benefit from mind-expansion from learning new languages.
[1] https://en.wikipedia.org/wiki/Verb–subject–object [2] https://en.wikipedia.org/wiki/Polish_notation
You gave an english quotation as an example of your natural language.
My only point is that there is no objective "natural" ordering, what is natural to each person depends on their starting point. Because this is somewhat arbitrary and provincial, it is good to be exposed to alternatives.
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:
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: 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...