5 ms·
I guess the benefit of lazy by default is that (given Haskell is an experiment in purity) it sets the expectation that things will be side-effect free by defaul
by allertonm 14y ago
I guess the benefit of lazy by default is that (given Haskell is an experiment in purity) it sets the expectation that things will be side-effect free by default.
Were that not a design criteria it might have been better to make things strict by default and have a "lazy" monad rather than do lazy by default and use monads for all the side effecting stuff.
- ky3 14y agoTotal functions embed into partial ones, which is why we have a partiality monad. The opposite arrow doesn't exist, which is why we don't have a totality monad. Now lazy and eager are properly adjectives that govern beta reduction, that is, the interaction between a function and its argument. The short of it is that neither an eager nor a lazy monad makes any sense. (Heh, I'm totally citing this in the monads class I teach as proof of why unpacking monads starting from functors is a win.)
- allertonm 14y agoHappy to be of service with my naive wonderings :) Anyway, thanks, I'm not much of a PLT guy but I can begin to see why this could not work.