It turns out it's quite hard to have @safe pure nothrow functions. Oh, and const.

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Sun Sep 14 05:48:46 PDT 2014


On 09/14/2014 10:47 AM, Kagamin wrote:
> 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,

The circumstances under which a callback will be invoked are hardly 
implementation details.

> and can't reason about behavior of inout argument just by seeing it being inout.
> ...

Most inout functions don't also take an inout callback.



More information about the Digitalmars-d mailing list