
30 Oct
2011
30 Oct
'11
9:31 p.m.
On Sun, Oct 30, 2011 at 6:20 PM, Ben Franksen
According to the original STM paper the implementation does an equality test, albeit only for pointer equality.
It strikes me as bad form to depend on characteristics of `the implementation`. An incremented integer would probably be ok, (no need to evaluate it, since the closure is newly allocated, thus a new object) Evaluation would be necessary to avoid a subtle space-leak with laziness semantics. The size of the closure is potentially linear with the number of allocations. A little more on the safe side is a new TVar
That works too. Regards, Dave