Are contracts intended for verifying @safety;
Somebody via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Nov 7 13:13:50 PST 2016
On Monday, 7 November 2016 at 21:05:32 UTC, Jonathan M Davis
wrote:
>
> No. @trusted. The calling function could only be marked @safe
> if the callee were @trusted, and I was suggesting that it be
> marked @system so that it's then clear to the caller that they
> need to pass the correct arguments for it to be okay to treat
> it as @safe and mark the caller as @trusted. If need be, the
> contract can be documented to make it clear what's required for
> it to be reasonable to mark the caller as @trusted.
>
> - Jonathan M Davis
Oh, I see. I think I prefer to use the modified enforce trough
(see above), so I have no need to make @trusted layers in the
calling site. Thanks anyway.
More information about the Digitalmars-d-learn
mailing list