Return by 'ref' problems...
Manu
turkeyman at gmail.com
Fri May 4 17:16:40 PDT 2012
On 5 May 2012 02:38, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> On Saturday, May 05, 2012 02:30:00 Manu wrote:
> > On 4 May 2012 23:16, Jakob Ovrum <jakobovrum at gmail.com> wrote:
> > > Perhaps it would be better if "a" was declared like this:
> > >> ref(int) a ();
> > >
> > > ref is not a type qualifier, I think that would be even more
> confusing. It
> > > would be completely out of sync with the rest of the language.
> >
> > But maybe it should be, then you'd be able to declare ref variables
> > anywhere, like in C++... what's the disadvantage of that?
>
> I know that Walter's against it, but unfortunately, I don't recall his
> arguments. But I'd certainly be very surprised if it ever happened.
>
Yes, I get that impression also. But it seems strange, it would
automatically solve these problems, and as a handy bonus, it would be
useful in lots of other situations! :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120505/d6701194/attachment.html>
More information about the Digitalmars-d
mailing list