4 ms·
Haskell and ML at least have advanced type systems. Since types are erased during compilation, you can't reason about type systems in terms of their impact on t
by MichaelBurge 10y ago
Haskell and ML at least have advanced type systems. Since types are erased during compilation, you can't reason about type systems in terms of their impact on the generated code. An example of a simple type system is C with its structs.
Haskell also has lazy evaluation, which is very difficult to do in C. Obviously you could encode your own trampolines, but at that point you might as well be coding in a Turing tar pit language "where anything is possible but nothing of interest is practical".
Pattern-matching and ADTs are also usually difficult to do in other languages.
Most of the benefits of something like Haskell only show up on larger projects, so it's not meaningful to point to specific language features as a point against it. I can do just about anything in C. The type systems you probably can't do; you'd have to embed a language and that doesn't count.