Thoughts on possible tuple semantics

Dicebot public at dicebot.lv
Thu Aug 22 07:29:47 PDT 2013


On Thursday, 22 August 2013 at 14:22:50 UTC, deadalnix wrote:
> One is a tuple, the other is a sequence. They are different 
> beast and have different behavior.
>
> The fact that it is similar to what we have now is on purpose, 
> so we don't need to break a lot of code. Plus, with the 
> proposed addition, it allow for nice library tuples.

I am confused. You proposed tuple implementation is essentially 
the very same current std.typecons.Tuple is. So I can see only 
two differences between value sequence and tuple:

1) latter has address and ABI
2) former auto-expands

Anything else?

>>> Theses are alias sequences.
>>
>> As I have already said, it is no less confusing to classify as 
>> alias sequence something that is not limited to aliases.
>
> It is what alias parameter for templates are. Simply keeping 
> the terminology here.

Wait, what? Alias parameters for templates have nothing to do 
with template argument lists (other than being one possible type 
of that list element). In other words, "T..." can contain more 
stuff than "alias T..." (imaginary syntax).

And, considering the fact that we already have two different 
alias semantics (for template alias parameters and normal 
aliases), it is a dangerous terminology to chose anyway.


More information about the Digitalmars-d mailing list