[Issue 14125] @trusted nested helper functions in std.file

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Feb 4 21:23:57 PST 2015


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

--- Comment #58 from Andrei Alexandrescu <andrei at erdani.com> ---
(In reply to Dicebot from comment #57)
> You shouldn't consider those wrapper really @trusted - they have _never_
> supposed to be ones. It is simply a workaround for bunch of language
> limitations. I'd love to have something better to address the issue - not
> regress to worse solution because workaround was not good enough.

We do have something better: @trusted functions that offer safe interfaces with
unsafe implementations. This is the right thing to do. This whole
fine-granularity of trusted mini-functions adding no safety is a gross abuse of
a good notion.

--


More information about the Digitalmars-d-bugs mailing list