[Issue 5212] no escape analysis for typesafe variadic function arguments
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 1 10:35:24 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=5212
--- Comment #14 from bearophile_hugs at eml.cc 2013-12-01 10:35:22 PST ---
(In reply to comment #13)
> I don't think that implicit .dup is the way to go here.
> Typesafe variadic functions are about efficiently passing multiple arguments.
Generally safety triumphs over efficiency. So what solution do you propose?
Automatically changing all functions with typesafe variadic arguements into
@system is not safe, it's a breaking change, and it doesn't solve the problem.
Perhaps a solution is to attach an implicit "scope" attribute too all typesafe
variadic arguments, so this:
class Foo {
int[] args;
this(int[] args_...) {
}
}
Is seen by the compiler as:
class Foo {
int[] args;
this(scope int[] args_...) {
}
}
But even if this will work, currently scope is not well implemented.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list