It’s not what programming languages do, it’s what they shepherd you to.
How many of you have listened, read or taken part in a discussion about programming languages that goes like the following: Person A: "Pro…
Read in full here:
This thread was posted by one of our members via one of our news source trackers.
For learning, hmm… Haskell is great for a lot of the concepts it gives you, but Rust has a lot of them as well (though not all), however the Rust ability to actually teach you good ownership models is one of the most valuable things that you could learn in any language, that combined with its great error message probably means I’d pick Rust as the best to learn of all of those.
As for what I actually “like” best, well “that depends” on what I’m doing, lol. OCaml I most like as, say, a python replacement, I’d never pick python over ocaml unless I need a specific library, OCaml is fantastic for whipping stuff up. Rust for most else. Haskell is more of a fun thing but doesn’t really gain much in terms of productivity over OCaml or Rust.
When I was younger I would have definitely preferred a language that lets you do what you want (like C, C++ or Python) instead of one that shepherd you on what you can do. Now I would say that a stricter language like Rust or definitely better especially for team work and large code bases in general.
OCaml, it’s about as succinct as python, compiles even faster than Go, and is as strongly typed as haskell (though no monads or typeclasses or so, it has more compilation friendly variants of such things, it’s a workhorse language, not an academic language), has a repl and interpreter or can compile to native code on par with C in speed with no external runtime needed at all, is also wonderfully easy to bind to external C API libraries too! Plus, it ‘had’ a GIL like python so concurrency was python-like, but now multicore is finally landing so that restriction is gone and it now has what I say is the utterly most fascinating concurrency primitives that I’ve seen in any language anywhere! ^.^
But still, learning ownership is incredibly important, no matter your language, and OCaml can still bite you with ownership bugs 99% of the time as with most languages. ^.^;
This might be a bit off-topic for this thread, but I hear people (well ODL mostly!) really like OCaml but I wonder why it’s never really ‘taken off’ or become more mainstream? What do you think it is lacking or what is preventing that? (Maybe we need a dedicated thread for that )
It’s pretty well taken off long ago actually. Big companies from Jane Street to Facebook have a substantial part of their tooling made in it to a surprising number of programming language’s first compiler are written in it (like Rust, lol). It’s far more active than you’d think, it’s one of those quiet giants, like erlang (though even bigger and far more used than erlang).