static arrays becoming value types
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue Oct 20 19:45:53 PDT 2009
Robert Jacques wrote:
> On Tue, 20 Oct 2009 20:38:33 -0400, Leandro Lucarella <llucax at gmail.com>
> wrote:
>> Yes, D support for tuples is way far from ideal.
>
> How so? I think this is merely the difference between a library type in
> a flexible language and a built-in type in an inflexible language. I
> mean the example was essentially:
> In D:
> Apple a
> Apple b
> Orange c
>
> assert(a != c); // Error: incompatible types Apple and Orange
>
> In SOL:
> Apple a
> Apple b
> Apple c
>
> assert(a != c); // ok, both a and c are apples.
>
> Now, if SOL allowed tuples to do things you can't do today in D, like
> assign a tuple to a struct with the same signature, then this might be a
> point. But that wasn't the example given.
I also don't understand all the argument about structural vs. name
equivalence.
Andrei
More information about the Digitalmars-d
mailing list