Re:Where FP meets OO
by gclaramunt on Monday December 29, 2014 @03:29PM
(#8811607)
yes, that part makes sense, but in Haskell, an unknown "message" is a compiler error, and bottom represents abnormal termination (e.g exception or even non termination), I don't really understand how that's related to inheritance.
[ Parent
| on HN ]
Re:Where FP meets OO
by dschiptsov on Monday December 29, 2014 @05:53PM
(#8812269)
I am not sure that an unknown message could be caught at compile time, because we don't know everything in advance. I also don't think that static type checking is the only way to program.
In that toy example I should return an error, because '() is a legit value.