2 ms·
But the thing is, null/nil/incorrect type references (the cause of NPEs and doesNotUnderstand:s) aren't a problem in Haskell. If you try to pass the wrong type,
by chc 16y ago
But the thing is, null/nil/incorrect type references (the cause of NPEs and doesNotUnderstand:s) aren't a problem in Haskell. If you try to pass the wrong type, you'll know right away, before you even get to your hand-written tests — and values that might be Nothing (the Haskell nil) are a different type than normal values. A plain-jane String that is always a list of characters is a different type than a Maybe String and the compiler will catch the mistake for you if you forget that.