"scope" and "delete" are being removed, but not type-safe variadic templates?

%u wfunction at hotmail.com
Mon Jan 31 02:10:23 PST 2011


Hi,

I just realized something: If the delete keyword is being removed because it's
dangerous, and if the scope storage class is being removed because of the same
dangling reference problem, how come

    int[] global_var;
    void foo(int[] args...) { global_var = args; }

isn't considered to be just as dangerous, and therefore also being removed?
(Or perhaps this is a bug, and we should always add the scope modifier so that
it prevents reference escaping?)

Thanks! :)


More information about the Digitalmars-d mailing list