Just where has this language gone wrong?
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue Jul 24 06:49:46 PDT 2012
On 7/24/12 5:03 AM, 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)
Library solution.
Andrei
More information about the Digitalmars-d
mailing list