[Issue 14125] std.file has gotten out of hand
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Feb 4 16:58:31 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14125
--- Comment #20 from hsteoh at quickfur.ath.cx ---
It seems that there's a disconnect here between @trusted as marking a trusted
*interface* (i.e., behind the interface is code that's potentially dangerous,
but you cannot trigger the dangerous behaviour using that interface), and
@trusted as marking a potentially dangerous *operation* that is actually safe
because the surrounding context ensures that it is never used in an unsafe way.
The former is for presenting an interface to the user that we can verify won't
trigger unsafe behaviour; the latter is for preventing accidental breakage of
the trusted code by careless change. What Walter said pertains to the former;
what Dicebot said pertains to the latter.
Neither are directly related to syntax, though, which is apparently what
provoked this backlash. If it's the syntax that's the problem, then we should
be looking at dedicated syntax for @trusted blocks inside functions, or always
inlining lambdas that are immediately invoked. Putting std.file on the pedestal
as the whipping boy isn't actually solving the core issues IMO.
--
More information about the Digitalmars-d-bugs
mailing list