Explicit Slicing of std.container.Array
"Nordlöw" via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jan 24 05:11:31 PST 2015
Is there a reason why std.container.Array have to be explicitly
sliced before being processed by range algorithms such as filter
typically as
import std.container: Array;
Array!int a;
foreach (e; a[].filter!"true") {}
?
Does memory allocation play a role?
I would like to see it be used in replace of D builtin arrays
without any code changes.
More information about the Digitalmars-d-learn
mailing list