Discussion on Go and D

Manu turkeyman at gmail.com
Sun Apr 8 18:01:07 PDT 2012


On 9 April 2012 03:46, Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:

> On 4/9/12, Manu <turkeyman at gmail.com> wrote:
> > (...why can't you use 'ref' in regular declarations? I frequently find
> > myself wanting to use ref locally for this exact reason.)
>
> I think the reason for this was because references are supposed to be
> hidden from the user.
>
> But if you look it from a safety angle you can escape a reference to a
> local variable (ends up being garbage after function exit), but you
> can't escape an alias declaration (I think so anywho).
>

... O_o
I don't follow. Can you give an example that shows this insecurity?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120409/5ac76996/attachment.html>


More information about the Digitalmars-d mailing list