[Issue 2194] Variadic parameters of non-array types
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jul 26 04:06:53 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2194
------- Comment #2 from brunodomedeiros+bugz at gmail.com 2008-07-26 06:06 -------
(In reply to comment #1)
> The advantage is that, given:
> class C { int a, b, c; }
> void foo(C c...) {}
> You can call either:
> foo(new C(1, 2, 3));
> foo(1, 2, 3);
> For primitive types it is indeed useless, though.
I see. Well then, it becomes an issue of which alternative is better. I still
prefer the first one, as I think it's cleaner.
--
More information about the Digitalmars-d-bugs
mailing list