4 ms·
Thanks for speaking my mind! Any typesystem that offers algebraic data types solve issues of this kind. As crdoconnor rightly puts it, handling these cases is
by eru 12y ago
Thanks for speaking my mind!
Any typesystem that offers algebraic data types solve issues of this kind. As crdoconnor rightly puts it, handling these cases is ultimately a burden your spec has to bear. Haskell nudges you to handle them upfront.
What I hate most, is people using unusual but cromulent values as sentinels. Eg a function that takes a timeout will often interpret 0 as infinity. That's just wrong, and a symptom of working around an inadequate type system.