On Wed, 4 May 2005 03:02:58 -0400 [EMAIL PROTECTED] wrote: > Quoting Erik de Castro Lopo <[EMAIL PROTECTED]>: > > > Yes, but only if your functions are impure. > > Wrong. An unevaluated thunk can, in general, be much larger than what > the thunk evaluates to. (Think of "length" of a large list, for example.) > If such a thunk is unevaluated but not garbage for a considerable time, > then you have a space leak. > > So you do need to think about evaluation order. One good rule of thumb > is: On large data structures, try to have a single consumer only.
Ahh, OK. Thats a significantly non-trivial detail to have to think about :-). Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo [EMAIL PROTECTED] (Yes it's valid) +-----------------------------------------------------------+ "It's far too easy to make fun of Microsoft products, but it takes a real man to make them work, and a god to make them do anything useful" -- Anonymous _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
