ref is unsafe

Dmitry Olshansky dmitry.olsh at gmail.com
Sun Dec 30 03:30:55 PST 2012


12/30/2012 12:37 PM, Jonathan M Davis пишет:
> After some recent discussions relating to auto ref and const ref, I have come
> to the conlusion that as it stands, ref is not @safe. It's @system. And I
> think that we need to take a serious look at it to see what we can do to make
> it @safe. The problem is combining code that takes ref parameters with code
> that returns by ref. Take this code for example:

[snip]

> And maybe another solution which I can't think of at the moment would be
> better. But my point is that we currently have a _major_ hole in SafeD thanks
> to the combination of ref parameters and ref return types, and we need to find
> a solution.
>
> - Jonathan M Davis
>
>
> Related: http://d.puremagic.com/issues/show_bug.cgi?id=8838

And another one:
http://d.puremagic.com/issues/show_bug.cgi?id=9195

-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list