Will the D GC be awesome?

Timon Gehr timon.gehr at gmx.ch
Thu Oct 4 11:06:17 PDT 2012


On 10/04/2012 05:16 PM, Tommi wrote:
> I wonder if tuple should automatically expand (flatten) into a list of
> arguments not only when used with template parameters, but with regular
> functions as well. This so, that it would enable composition of tuple
> returning functions with functions that take in individual arguments
> instead of a tuple, enabling that:
>
> Tuple!(int, int) getTuple()
> {
>      //...
> }
>
> void fun(int arg1, int arg2)
> {
>      //...
> }
>
> void main()
> {
>      fun( getTuple() );
> }

No, it should not.

void main(){
     fun(getTuple().expand);
}


More information about the Digitalmars-d mailing list