digitalmars.D.learn - Why no mutable shared from uniqueness?
- Quirin Schroll (13/13) Feb 11 If a pure factory function returns an non-`shared`-type object,
If a pure factory function returns an non-`shared`-type object,
that type should be convertible to `shared` or am I mistaken?
Essentially, this should compile:
```d
int[] make() pure safe;
void main() safe
{
shared xs = make();
}
```
Currently, only the conversion to `const shared` is enabled by
uniqueness. I don’t understand that limitation, but I’m not sure
I understand `shared` very well.
Feb 11







Quirin Schroll <qs.il.paperinik gmail.com>