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

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Feb 4 18:14:53 PST 2015


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

--- Comment #36 from David Nadlinger <code at klickverbot.at> ---
(In reply to Walter Bright from comment #33)
> By encapsulating the unsafe part in an @trusted local function. But that
> function must STILL present a safe interface. Merely wrapping it with "here
> is an unsafe operation" may fly with other languages, but it is not
> acceptable in D.

May I suggest that you try to understand the issue at hand instead of repeating
the same non-solution over and over again? For a small sampling of code that
can't easily be rewritten to follow your demands, check std.array.

(Again, "() @trusted {…}()" would arguably be the better solution, but that's
an inliner problem waiting to be fixed.)

--


More information about the Digitalmars-d-bugs mailing list