Objective-D, reflective programming, dynamic typing

Jarrett Billingsley jarrett.billingsley at gmail.com
Fri Apr 3 08:55:38 PDT 2009


On Fri, Apr 3, 2009 at 11:20 AM, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:

>> You can't.  D's varargs suck.
>
> Of course you can. Where did that come from?
>
> void foo(T...)(T args) { bar(args); }
> void bar(T...)(T args) {  foreach (a; args) writeln(a); }

*NOT* the same thing.  They are templated, which means a new
instantiation for each different combination of argument types, and
cannot be virtual.  Please keep that in mind.



More information about the Digitalmars-d mailing list