On Friday, 25 April 2014 at 13:18:13 UTC, bearophile wrote:
Dicebot:

It would be weird exception of general type system rules with no practical justification I can readily imagine.

I partially disagree. It could be useful to have structural typing (http://en.wikipedia.org/wiki/Structural_type_system ) only on tuples (and not on structs), because the formal definition of tuple goes well with structural typing. This also implies the type equivalence of const tuple with a tuple of const fields.

Bye,
bearophile

Again, you refer to some sort of formal definition of tuple which is not applicable to D. We don't have real tuples in D. There are structures that emulate some of tuple properties and there is a built-in feature that is called tuple but is not one in practice.

For your objections to make sense tuple would need to be inroduced as completely new first class type system entity. As this will never happen, discussion of imaginary "proper" tuple traits is also unapplicable.

Reply via email to