Better tuples

bearophile bearophileHUGS at lycos.com
Wed Jun 30 17:03:23 PDT 2010


Eric Poggel:
>would it make sense to make struct instances and tuples the same thing?<

It's a nice idea, but if all structs become tuples, and D needs to support separate compilation, then modules that define structs need to contain the compiled methods (instantiated templates) that implement all the features of Tuples. So to keep programs small I think it's better to keep structs simple, and define a Tuple with richer semantics.

Bye,
bearophile


More information about the Digitalmars-d mailing list