scope escaping

Benjamin Thaut code at benjamin-thaut.de
Thu Feb 6 12:17:25 PST 2014


Another idea. I would totaly love that behaviour.

void foo(scope int[] arg) { ... }

foo([1 2 3 4]); // allocates the array literal on the stack, because it 
is scoped.

Kind Regards
Benjamin Thaut


More information about the Digitalmars-d mailing list