D needs a type expression syntax

Quirin Schroll qs.il.paperinik at gmail.com
Wed May 10 13:29:08 UTC 2023


On Tuesday, 9 May 2023 at 20:37:53 UTC, Basile B. wrote:
> On Sunday, 7 May 2023 at 07:35:22 UTC, Timon Gehr wrote:
>> On 5/7/23 02:16, Walter Bright wrote:
>>> [...]
>>
>> There is no conflict between the two features in the first 
>> place.
>>
>> [...]
>
> In my opinion tuples are more like struct... I dont't see how 
> they are related to arrays.

What is a `T[2]`? Something that contains two `T`s, accessed by 
index, otherwise unstructured.

What is a `Tuple!(T, T)`? Something that contains two `T`s, 
accessed by index, otherwise unstructured.

Can you see it now?

(If you thought I meant `T[]`, that is indeed unrelated to 
tuples. But `T[]` isn’t an array, it’s a slice.)


More information about the Digitalmars-d mailing list