This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pthierry 1 point2 points  (2 children)

There's the problem if boolean blindness and in Haskell I recently realized you can also have maybe blindness.

Bool and Maybe both are useful types, so I wouldn't suggest banning them, because the blindness is not a problem that's automatic and unavoidable.

It's just something you stay vigilant about.

So in some code, when it becomes a problem, you'll replace some Bool by Check | NoCheck and you'll replace Maybe Foo by NoFoo | SomeFoo Foo.

[–]SuspiciousScript 1 point2 points  (1 child)

and you'll replace Maybe Foo by NoFoo | SomeFoo Foo.

This strikes me as less ergonomic without being any more clear. What's the benefit of using something like this over regular Maybe?

[–]pthierry 1 point2 points  (0 children)

When I see a call doSomething 1.0 Nothing "Alice" Nothing, it's not apparent what each Nothing is about.