On Saturday, 13 September 2014 at 23:41:55 UTC, Timon Gehr wrote:
All the examples there keep their non-modification guarantees.
Modifications to inout parameters are visible at the call site.

Modifications are visible if you know the inout argument will be passed to the delegate, i.e. if you know the callee's implementation, and can't reason about behavior of inout argument just by seeing it being inout.

E.g. the inout qualifier of the enclosing function should still be fully compatible with _itself_ even when data is accessed and modified from the nested function.

Yeah, I think, it's logical if the nested function is just a fragment of enclosing function; that way nested functions can be created without hindering access to variables of enclosing function.

Reply via email to