4 ms·
The last paragraph show this article for what is is. That's an Haskell fan trying to discredit Ocaml and doing it very poorly. It takes a special kind of write
by WastingMyTime89 3y ago
The last paragraph show this article for what is is. That's an Haskell fan trying to discredit Ocaml and doing it very poorly.
It takes a special kind of writer to write an incorrect sentence about the expression syntax while quoting the actual definition from the specification which contradicts what's written just after.
I generally disagree about the complaint regarding the syntax. If you indent the code properly and use parentheses as you should and the language invites you to do, none of this is ambiguous. That's bad code not bad language design.
- boxed 3y ago"the language invits you to do"? What does that mean? If it's the right thing to do it shouldn't be in invitation surely, but a syntax requirement?
- WastingMyTime89 3y ago> What does that mean? That's a best practice. Like always using braces in C or Java or not using ternary operators in hard to read way. The syntax is unambiguous but non obvious to read if you don't know precedence rules as it is for most languages. You can make it explicit using parentheses which you should. I personally agree that parentheses around tuples should be mandatory but it's fairly easy to just put them.
- boxed 3y agoThose are examples of C and Java being very bad. So yea, I think my point stands.
- WastingMyTime89 3y agoI’m not sure I understand your point then because the code in the article is definitely very bad OCaml which is what I have been trying to tell you from the start.
- boxed 3y agoIt's very bad if a language community KNOWS something is very bad and they still allow that to be valid syntax. Like `if (x) break;` in Java/C/C++. It's VERY BAD. Not fixing your language is a big red flag.
- Verdex 3y agoI agree, but the languages that actually do this are in a hyper-minority, I feel. Nearly every language allows you to do the wrong thing and then only lets you discover this at runtime via exception OR sometimes even just by careful examination of subtly incorrect output. As such, this doesn't really feel like the best argument against ocaml (and I believe arguments against ocaml do exist and on a much more accessible level).