Andrei Alexandrescu wrote: > Daniel Keep wrote: >> >> Andrei Alexandrescu wrote: >>> Jarrett Billingsley wrote: >>>> ... >>>> >>>> Why not just make tuples first-class types? <_< >>> Why not not? >>> >>> Andrei >> >> Because people keep having to invent hacks to work around the fact that >> we can't return tuples. std.typecons.Tuple is a perfect example of this. > > "It's not a hack, it's a feature." > > If you don't have a list in the language and build it as a user-defined > type, is that a hack? > > Andrei
Only if the language itself has lists except you can't return them from functions, and you have to wrap them in a struct to make that work. Except then you can't index them, so you have to add "alias this;" to make *that* work. :P -- Daniel