DMD 1.014 release

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Tue May 1 13:24:18 PDT 2007


Walter Bright wrote:
> Frits van Bommel wrote:
>> Like it says in the comment, I wonder if the behavior of the second 
>> one is a bug...
> 
> It isn't a bug, though I'm not sure what utility it has.

I'd prefer it if it wasn't allowed. It would probably catch 
accidental-mismatch bugs without reducing the power of the construct. If 
someone actually *wants* the current behavior, they could use the 
implicit tuple flattening to put all keys in one tuple and all values in 
another.

I just don't think that "[A : B, 1 : 2, C : D][1]" should be allowed to 
be anything other than 2 regardless of what A, B, C and D happen to be 
(as long as A and C aren't tuples containing the value 1).



More information about the Digitalmars-d-announce mailing list