|
|
|
|
|
by derleth
5472 days ago
|
|
> Java and C++ are designed for serious work. In these, you take types, error checking and exceptions seriously, you keep the code clean and robust, and you R the FM thoroughly for every single external function you call. So how do they compare to Haskell, especially when it comes to types and code cleanliness? For those who don't have Haskell listed in their path, I'll tell you: Haskell takes types a lot more seriously, but they're so different from what a C++ or Java programmer would think of as types that it's difficult to make a direct comparison. Ditto error checking, which, to a large extent, is baked into the type system such that it's a compilation error to not check for a lot of problems. Cleanliness is practically an obsession, to the point you'll wonder how anyone can write useful code in Haskell until a switch flips in your head and you begin to wonder how people can live with Java and C++. ;-) Frankly, every language you learn should cause a switch to flip in your head like that. |
|
They let you compile code that has no possible way of working.
it's a compilation error to not check for a lot of problems
Oooh, Java has this too! Checked exceptions!
Oh, but except for the RuntimeError class of exceptions, that is, but errors never happen at runtime, right?