
There is an opinion that Bool type has problems. It's "dangerous", because it's not good to be used as flag for success/fail result. I read this post: https://existentialtype.wordpress.com/2011/03/15/boolean-blindness/ and was shocked. How popular is such opinion? Is it true, that bool is "bad" type?
To me the argument boils down to the `head` case mentioned by Alex. Most programming languages force you to write code like if List.empty l then ... else ... x = List.head l ... where the problem is that the fact that the List.head call will find the list non-empty is not obvious (in the sense that it requires reasoning). In contrast case l | nil => ... | cons x xs => ... makes it trivially obvious that `x` is extracted from a non-empty list without any reasoning needed at all. Stefan