On Monday, 29 December 2014 at 20:20:45 UTC, Steven Schveighoffer wrote:
But this precludes doing anything with a mutable t inside foo, since inout means "const within the function".

Hm, yes, this is indeed quite the problem. I have totally forgot that compiler has no means of figuring out which invocation of inout is currently used.

But something very similar feels necessary to me. There is constness, lifetime, purity - inventing new dedicated keyword for each case does not feel like scaling approach. Especially when existing one is named so generic.

Reply via email to