Discussion of proposal 2015-007 (Addition of Ref module).
rossberg-old opened this issue · comments
This issue is for discussion of proposal 2015-007 (Addition of Ref module).
Should the type of exchange
be:
val exchange : 'a ref * ‘a -> ‘a
rather than
val exchange : 'a ref * ‘a ref -> ‘a
Yes, indeed. Fixed, thanks.
Could you include in the proposal two types of reference cell? Thread-unsafe (what SML already has) and thread-safe (requiring atomic modifications). The signature for both implementations should be exactly the same.