4 ms·
How difficult will code be to read if implicit operations are happening without any mention of the language construct executing them? As far as this goes, Haske
by hopp_check 13y ago
How difficult will code be to read if implicit operations are happening without any mention of the language construct executing them?
As far as this goes, Haskell's Maybe monad is the simplest system I've ever seen:
let x = Just 3 in
do
value <- x
guard (value > 1)
return (value * 4)
If x was 'Nothing' then the whole operation would short circuit and 'Nothing' would be returned. If the guard fails, then 'Nothing' is returned.