4 ms·
I agree with almost all of this. And I'd add that using OCaml on Windows is so painful as to be effectively not possible. Where I slightly disagree: 1. I thin
by IshKebab 4y ago
I agree with almost all of this. And I'd add that using OCaml on Windows is so painful as to be effectively not possible.
Where I slightly disagree:
1. I think expression based is fine. He's definitely right that OCaml does expressions wrong (it's very unclear where expressions end - I often end up adding and removing semicolons until the compiler stops complaining)... but I never have that problem in Rust.
2. Haskell's separation of the types of functions from the arguments is definitely not better. I don't want to have to manually count through two lists to match them up. And he correctly points out that currying is bad (overall) but at least OCaml sensibly separates arguments and return values, unlike Haskell which just checks them all in a -> separated list.
But overall this is a great list. I'm sure OCaml and Haskell programmers will feel like the author doesn't "get it" but I think if they search their feelings they'll know it to be true.
- yawaramin 4y agoIt's also worth noting that the author says that even with these 'deficiencies', OCaml is still far above everything else :-)
- IshKebab 4y agoThey didn't actually go that far, but yes it's still better than many languages. I would say Rust solves almost all of the issues identified in this post. It obviously introduces the extra complexity of no GC & borrow checking, but if you're ok with that I don't see why you would pick OCaml over Rust.
- deredede 4y agoThe menhir parser generator is extremely good and doesn't quite have an equivalent in the Rust world. But other than that, in no particular order: - While it has its downsides, OCaml's module system (and functors especially) is extremely powerful and allows for all sorts of higher-kinded abstractions that are currently out of reach of Rust's type system, especially when combined with first-class modules - No monorphisation means more reasonable compile times - Some of the advanced type system features (GADTs, extensible types, polymorphic variants) are really quite nice (but really, menhir is great, and I miss it whenever I need to parse things in another language)
- yawaramin 4y ago> They didn't actually go that far Yes, they did. This is literally from the third paragraph of the article: > It’s actually a weirdly optimistic thing: that a language with so many glaring deficiencies stands far above everything else.
- delta_p_delta_x 4y ago> using OCaml on Windows is so painful as to be effectively not possible Have you considered F# instead? Native support in the dotnet CLI, VS Code, Visual Studio, and Rider. Not to mention the huge .NET standard library...
- IshKebab 4y agoYeah it's on my to-try list! Especially because it has native support for single file scripts with dependencies. How many of the issues in this post does it solve? Or is it basically the same?
- dllthomas 4y ago> currying is bad (overall) Super easy currying is great! Automatic currying is bad (overall).