D needs a type expression syntax

Petar Petar
Mon May 8 11:21:33 UTC 2023


On Sunday, 7 May 2023 at 07:35:22 UTC, Timon Gehr wrote:
> [..]
>
> Having `T[2]` be a tuple type `[T,T]` is one of those things 
> that initially sound good enough on paper until you actually 
> examine the existing array semantics that D already has and try 
> to square them with tuple semantics. It does not work at all. D 
> would need to break arrays. It's a pipe dream.
>

Can you explain in more detail which parts of the language make 
the unification impossible currently? Or to phrase the question 
differently, in a hypothetical D3 language what (breaking) 
changes we would need to do relative to D2 to make this possible?


More information about the Digitalmars-d mailing list