by lesterpig · 11y ago · 0 comments
And, well... I'm not really satisfied with it. OCaml produces a small amount of code, but is really slow and hard to understand. Sometimes, it looks like obfuscated code!
Documentation and libraries are not polished, and I would recommend Haskell instead of OCaml. Good for research and some algorithms, bad for applications.
And... God... "This page was last updated on 17 June 2006."
OCaml is slow? and your recommendation is to use Haskell instead... That doesn't compute well if we were to assume that you are writing some compute-intensive tasks for which (unoptimized non-C language can be "slower".
It more likely the case that students hate whatever languages the university teaches in place of language-de-jour. (Just read the reviews of SICP on Amazon).
And yes there are pages on the internet that are older than 2006, so what? No one goes "Pffft.. this is 300 years old.." when they come across Newton's Principa.
The difference is that programming languages evolve all the time. Having such an old page still up and promoted to the front page of Hacker News tells everyone that OCaml hasn't evolved since 2006.
Please don't be so sharp, I really don't understand why this link is in HN, and I'm just exposing my point of view, after practising OCaml a lot. So what, I'm a student so my opinion is worthless?
When you are starting out, convenience and familiarity (which are visceral) can trump abstract notions like "pure", "correct", "reason-able".
I'm not saying your opinion is worthless, just that your judgement could be coloured by inexperience.
My sincere recommendation is to use "Real World OCaml" - https://realworldocaml.org/ as a reference to learn OCaml instead of old and busted tutorials littering the internet. Trust me, I have been trying to learn OCaml "on the side" for a few years and RWO is the first book that I have absolute love (even accounting for a wide variety of PL books I read) for being practical, current and explaining stuff.
Do you have some examples of well-known applications built with OCaml? I'll have to check that too.
Do you mean that OCaml produces small binaries, or that the language itself is compact? As for being slow, that's the first time I hear this charge being leveled. Single-thread performance is usually really good.
1. "unfamiliar" syntax. Well... It is unfamiliar if your first exposure to programming stopped at Java. Guess what .. pattern matching is quite an old convention in programming languages old (Prolog, Erlang, ML, Haskell)... and new (Rust, Swift)..
2. Standard libraries are a crap shoot... cruft accumulates in standard libraries just like any piece of software but harder to clean up owing to demands of backward compatibility. Just go and look at Python standard library. Even on a superficial level, the stdlib is a mix of CamelCase and under_score .. which can be irritating.
OCaml is not unique in this regard.
It's a one line function to write, but it certainly has no business being in the standard library.
It's worth noting, however, that I've had very, very few problems with the semantic properties of the language. I think the slog is worth it for that reason.
Well, the reason is that Caml predates those ecosystems; the original Caml was released nearly a decade before Java [1], and ML itself dates back to the 1970s.
Talk of syntax is almost always history and religion, not science.