Proof of concept for v2 - NO duplication, NO `static if` hell, NO difficulty with interoperability

Sebastiaan Koppe mail at skoppe.eu
Fri Nov 5 22:02:36 UTC 2021


On Friday, 5 November 2021 at 15:06:58 UTC, Paul Backus wrote:
> One idea that's come up recently in the community Discord is a 
> `unique(T)` qualifier, which would guarantee that any memory 
> reachable via indirections in a given `T` value is not aliased. 
> Exactly how to enforce this is an open question.

Yes. I would love to be able to express that an object has only 
one reference to it, as well as being able to express that 
requirement on arguments (which is like two sides of the same 
coin). The uniqueness doesn't always necessarily have to hold 
forever for it to be useful too.


More information about the Digitalmars-d mailing list