tuple not part of core language

monkyyy crazymonkyyy at gmail.com
Mon Jan 19 20:03:28 UTC 2026


On Monday, 19 January 2026 at 15:53:45 UTC, DLearner wrote:
> Hi
> Is there some reason why tuples are not part of the core 
> language (like, say, struct, which to me is v.similar) but has 
> to be pulled in via ```import std.typecons;```?

its a 30 year old code base, whats in there isnt cleanly mapped 
to theory

tuples are in there in a sense but tuple decomposition isnt and 
someones working on it

consider these code blocks:

```d
alias seq(T...)=T;
struct Tuple(T...){
   T me; alias me this;
}
```

Thin wrappers on "template sequences" turn into tuples (tho the 
std version is much much worse then this code) for better or 
worse, thats whats actaully inside the compiler and with 30 years 
of history youd have to blame lots of people and deconstruct the 
timeline.


More information about the Digitalmars-d-learn mailing list