tuple not part of core language

Timon Gehr timon.gehr at gmx.ch
Tue Jan 20 19:51:33 UTC 2026


On 1/20/26 18:54, Nick Treleaven wrote:
> On Tuesday, 20 January 2026 at 13:43:02 UTC, libxmoc wrote:
>> Timon's attempted PR did try to add tuples to core D,
> 
> Do you have a link? I don't see anything on https://github.com/dlang/dmd.

There was no PR to DMD, just a DIP that was DOA because it attempted to 
extend `alias this`.
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md

I also wanted to work on a PR at the time, but a) it would not have been 
merged and b) Andrei wanted me to work on `__mutable` instead.

Whether there is a druntime component is an implementation detail (and a 
lot of existing features require druntime support). However, 
semantically, I don't think it makes that much sense to add tuples to D 
that don't behave like `struct`s (except maybe there can be some magic 
for things like reverse type deduction through tuple literals).

Anyway, the unpacking DIP did get accepted recently (and pragmatically, 
unpacking is really the main thing that is missing in D), so we should 
try to get the implementation ready to merge. (IIRC there is still a 
known issue involving an ICE on unpack if a tuple component type has 
both move and copy constructors.)


More information about the Digitalmars-d-learn mailing list