Am 13.11.2012 09:40, schrieb Walter Bright: > > #2 is the interesting bit. That requires some compiler support, sort of like: > > __unique(Expression) > > which will allow it through if Expression is some combination of new, pure > functions, and other > Unique pointers. >
I just realized that using __unique(expression) vs. verifying the type must be unique is not really mutually exclusive. Unique!T (or Isolated!T) could simply support both. It could still expose plain, immutable or Isolated!T data fields and could still allow pure methods that only have these kinds of parameters to be called. So performing one-time reads is, even in that case, only necessary for certain operations.