On Tue, Mar 15, 2005 at 08:52:07AM -0800, Larry Wall wrote: > : That is fine because the three thunks are registered to the fh > : in evaluation order. What will be more fun is if they are all > : part of some other lazy lists, which may be accessed in some > : unpredictable order. > > You could treat seek as a synchronization point like close.
True. So maybe the trick is define such a set of synchronization points for resources that has lazy/eager conflicts, instead of forcing eager context on RHS of all infix:<=>, especially because most assignments probably only involve simple COW copying, so it'd be sad to lose the laziness benefit. > : That is why lazy languages typically use some sort of typechecking to > : avoid mixing computations with actions... :) > > Which is also what we're doing, except that we're hiding that fact > from the user whenever we can rather than rubbing their nose in it. :-) As long as surprises can be minimized (or at least explained), that's entirely fine, I think. :) Thanks, /Autrijus/
pgpnyvrdLFRBW.pgp
Description: PGP signature