~ patterns
John Meacham
john at repetae.net
Tue Jan 31 22:48:48 EST 2006
On Tue, Jan 31, 2006 at 11:05:37PM -0000, Simon Marlow wrote:
> On the other hand, if pattern bindings were strict by default, I bet
> there would be a lot fewer accidental space leaks.
I don't think this is true. I think there would just be a whole lot of a
different type of space leak. Lazy by default is more in the spirit of
haskell. case, function, and monadic binding matching is only strict out
of necessity since they actually need to scrutinize the values and that
makes perfect sense. if anything were to change, I'd make lambda
patterns lazy. (though, I don't feel particularly strongly about that,
since a case could be made for them being just a degenerate function
binding with only one alternative)
John
--
John Meacham - ⑆repetae.net⑆john⑈
More information about the Haskell-prime
mailing list