On 10/1/18 7:56 PM, Steven Schveighoffer wrote:
On 10/1/18 7:09 PM, Manu wrote:
Your entire example depends on escaping references. I think you missed
the point?
The problem with mutable wildcards is that you can assign them.
This exposes the problem in your design. The reason const works is
because you can't mutate it. Shared is not the same.
simple example:
void foo(scope shared int *a, scope shared int *b)
{
a = b;
}
Haha, of course, this has no effect!
In order for it to show the problem, a has to be ref'd.
-Steve