Objective-D, reflective programming, dynamic typing

Georg Wrede georg.wrede at iki.fi
Sat Apr 4 08:21:33 PDT 2009


Andrei Alexandrescu wrote:
> 
> void foo_templated(T...)(T args)
> {
>    Variant[args.length] dynatyped;
>    foreach (i, arg; args) dynatyped[i] = arg;
>    return foo(dynatyped);
> }
> void foo(Variant[] dynatyped...)
> {
>    ...
> }

Hmm. An idiom. My sweet tooth just got thirsty for syntactic sugar!



More information about the Digitalmars-d mailing list