I started with c++ at uni wheras it didn’t spur the slightest excitation in me. My mind ain’t imperative :/. Retrospectively the world partitions in three. (Conservative) industry, (Research) school, (voluntary/spontaneous) entrepreneurship. Engineering led to the industry, ergo c++. Soon I upgraded to D (dlang) impressed with the cpp lab tidying up. Casting off evangelists and conformity I found hundreds of languages. All had bigots, all claimed holiness, programming grail. A big sea. I felt lost. I looked up this page[randomly] https://rosettacode.org/wiki/Y_combinator and browsed for one single criteria : smallest code ever. I repeated this on various entries, not understanding any of it, just the sloc count. Why ? Because math is my girlfriend and it has semantic compression. That trait is easily spotted at first sight as everything(geometry, topology, algebra…) is piles of abstraction, encapsulations, DSL made upon more DSLs, thanks to a low level grammar found in the fabric itself. I filtered out OCaml, Haskell, Lisps as contenders. All smelled like math. Oddly enough, I just used my vision skills(pattern recognition engine) to subconsciously identify transliterated math scripture in foreign gibberish ! I then found out it was indeed descendants of a common root, lambda calculus. How funny I could spot a “visual invariant”. I was surprised that maths had another syntax for Turing machines. It’s no coincidence I had immediately recognised the familiar structure and adopted functional programming with a crush ever since. I was quite relieved that ended my quest.
In the thread I read a lot of confrontation on typeclasses. Personally I think Haskell and OCaml are not comparable. They simply derive different axioms. I do understand evolutionary behaviours such as mimicking, copying, mating ! But rather I see two isolated pools of researchers evolving endemic species. Orange-breasted sunbird and glacier bear. (OCaml is featherweight, Haskell is heavyweight). So for instance, you prefer geometry over number theory but you can’t say one is better than the other.
In the end, this is really just biology which is just an optimisation strategy.
I don’t know how multicore came before modular implicit. Perhaps pragmatic OCaml is fast and now guaranteed to run exponentially faster, for free, for years to come.
To my eye, modular implicit/typeclasses provide abstraction mechanism. That’s all I care about to write compact code or more easily. Hence I find it seriously missing in the eloquence quiver. That’s why I am beginning Haskell. I have a gut feeling it can help with math content. To be clarified.
F# has nice computation expressions. See Tomas Petricek’s academic paper.
I spent hours in and out reading GitHub threads on OCaml internals I don’t understand any of. However I observe how the core community works/members collaborate. It’s always disciplined, rigourous, formal, research grade. I just feel in the right hands. I trust the people who made this with boundless confidence. Incidentally I am amazed by the imperative translation which is magics to me and I fail to understand where all the patches come from.
I concur with a previous remark. Haskell is too broad. Pragmas are daunting DSL warnings. OCaml programs are instead accessible
To conclude, I came to OCaml naturally while it let me gain missing computing power !