memcpy() comparison: C, Rust, and D
Mathias Lang via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jan 31 12:00:33 PST 2017
On Tuesday, 31 January 2017 at 01:30:48 UTC, Walter Bright wrote:
>
> By this information being knowable from the declaration, the
> compiler knows it too and can make use of it.
*Can* make use of it... But won't.
Any code calling memcpy has to be in a @trusted wrapper, in which
`return scope` is not checked.
So adding `return scope` annotations to non-safe D binding is
just like adding documentation. Which is on par with what C is
doing, in the end.
More information about the Digitalmars-d
mailing list