3 ms·
A lot of people seem to think that type systems are either "you have it or you don't", when in actuality there are languages with type systems that can express
by DonaldPShimoda 5y ago
A lot of people seem to think that type systems are either "you have it or you don't", when in actuality there are languages with type systems that can express significantly more intricate relationships among data than the common languages.
The issue, of course, is that most common languages people use have a type system based on C's (with minor improvements). Those are all mostly interchangeable. But languages like Haskell and OCaml have the capabilities to directly express notions with types that Python, Java, or C would deeply struggle with.
(All this is to say: I agree with your point that people would benefit from doing a bit of Haskell to experience this first-hand!)
- Zababa 5y agoAnother big difference is in performance. If your language doesn't support immutability, adding it in with a library (like in JS) will add a huge runtime cost, while you get that for free in Haskell/OCaml.