[Issue 14125] std.file has gotten out of hand
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Feb 4 17:54:31 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14125
--- Comment #32 from David Nadlinger <code at klickverbot.at> ---
(In reply to hsteoh from comment #28)
> But still, the nagging issue is, how do we restrict the scope of @trusted
> inside a function body?
Agreed. This is especially necessary for template functions where the
@trusted-ness of the whole function might depend on the template arguments.
Many of them *need* something to the effect of what std.file is doing (or ()
@trusted {} ()) so that they can be @trusted at all, as it would be wrong to
apply the attribute at the function level.
Nota bene: Both Go and Rust offer finer granularity than whole functions for
marking code as unsafe, the former using special intrinsics, the latter using
"unsafe" blocks.
--
More information about the Digitalmars-d-bugs
mailing list