Just where has this language gone wrong?
Jonathan M Davis
jmdavisProg at gmx.com
Tue Jul 24 04:00:44 PDT 2012
On Tuesday, July 24, 2012 11:03:16 Simen Kjaeraas wrote:
> On Tue, 24 Jul 2012 04:21:18 +0200, Andrei Alexandrescu
>
> <SeeWebsiteForEmail at erdani.org> wrote:
> >> Tuple!(float, "x", float, "y") bar() {
> >> return typeof(return)( 0.0, 0.0 );
> >> }
>
> [snip]
>
> > We could make
> >
> > return tuple(0.0, 0.0);
> >
> > to work. I can't imagine a scenario in which this relaxation would cause
> > a bug.
>
> I would argue it should work, for the exact reasons outline above. And as
> you say, it should cause no bugs.
>
> But can it be made to work in current D, as a library solution? Or do you
> mean the language should be changed? (This looks to me a lot like the old
> opImplicitCast)
That's what alias this is for.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list