4 Dec
2007
4 Dec
'07
12:17 p.m.
Simon Peyton-Jones said:
But since the read may block, it matters *when* you perform it. For example if you print "Hello" and then read the IVar, you'll block after printing; but if you read the IVar and then print, the print won't come out. If the operation was pure (no IO) then you'd have a lot less control over when it happened.
But this is true of any expression in a non-strict language. Why the special treatment of IVars? Nikhil