Better syntax for varargs / variadic functions?
Chris Miller
chris at dprogramming.com
Thu Oct 5 21:29:54 PDT 2006
On Thu, 05 Oct 2006 04:41:38 -0400, Bill Baxter
<dnewsgroup at billbaxter.com> wrote:
> Much better!
>
> It seems very odd, though, that the opApply doesn't do the advancing of
> arg (the iw++ that next() does). If opApply took care of that, then
> get() or value() would probably be a better name than next().
Because a lot of times some arguments mean "look at next argument too" so
you'd only need to call next() again and it wouldn't goof up the
iteration; you could also even foreach() over the same args for a sub
range: foreach(arg; args){ foreach(arg; args){ if(foo)break; } }.
More information about the Digitalmars-d
mailing list