On Sunday, 12 May 2013 at 09:10:56 UTC, Simen Kjaeraas wrote:
On 2013-05-12, 08:12, deadalnix wrote:
On Saturday, 11 May 2013 at 22:24:38 UTC, Simen Kjaeraas wrote:
I'm not convinced. unique, like const or immutable, is
transitive. If foo
is unique, then so is foo.bar.
That isn't true. Please read microsoft's paper.
Done. *Mostly* transitive, then. Anything reachable through a
unique
reference is either unique or immutable.
No.
Think about it : when you reach something via a uniq pointer, it
is by definition not unique as you have 2 copies of it, because
you just accessed it.
Plus the unique pointer refers to a unique mutable graph of
object. A object into that graph can have several object into the
graph refereing to it.
You are wrong in 2 different ways.