bearophile wrote: [...] > Another possible solution is to modify the semantics of this kind of > arguments pass, so the code inside the function foo always see an > args array allocated on the heap:
> void foo(int[] args...) { // code > You may then add "scope" to restore the original lighter semantics: > void foo(scope int[] args...) { // code > This is safer than the current semantics because the safe design is > the built-in one and the faster is on request. I don't know how easy it would be, but I *really* like this proposal. It has one other advantage, in that you can use the `scope` keyword for things other than varargs, like closures. Cheers, Pillsy