Mon, 10 Aug 2009 01:56:35 +0200, Michiel Helvensteijn wrote: > Walter Bright wrote: > >>> But I know, unique isn't easy to implement to fit all the use cases we'd >>> like to solve. I'm just sharing a dream. >> >> We explored unique at length, and trying to make it work would render >> the rest of the language nearly unusably complex. > > I've heard 'unique' mentioned on this group now and then. What does it mean > in the context of programming languages?
Unique reference is a reference which is statically known to be the only reference to the underlying data. They have some interesting properties: - Modification of underlying data does not cause side effects - Can be implicitly cast to immutable - Can be implicitly cast to mutable They prove to be rather tricky both to specify and to implement though.
