[Issue 14125] std.file has gotten out of hand

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Feb 4 17:27:51 PST 2015


https://issues.dlang.org/show_bug.cgi?id=14125

--- Comment #26 from Walter Bright <bugzilla at digitalmars.com> ---
@trusted is intended to encapsulate unsafe code, not rely on the caller to call
@trusted code in a safe manner.

Simply using @trusted to bypass checks, and rely on supposedly @safe code to
then use those @trusted sequences correctly, defeats the purpose of @safe code.

The way @trusted is being used in std.file makes the supposedly @safe code
calling it uncheckable by the compiler.

@safe code must be 100% mechanically checkable, not correct by convention.

--


More information about the Digitalmars-d-bugs mailing list