C# code sample
Jesse Phillips
jessekphillips+D at gmail.com
Wed Jan 26 10:09:44 PST 2011
Kagamin Wrote:
> pragma Wrote:
>
> > i guess the D equivalent to IEnumerable is Range? how would it look like in D?
>
> Usually there's a little need for a range in such case. IEnumerable is usually used because there's a high need for the List collection so it's used even more often than arrays. Current druntime heap implementation already gives D arrays C# List performance.
What? Of course there is a reason to use a Range/Iterable and has nothing to do with performance. He could be getting his double[] from any number of functions found in std.algorithm, most of whom return their own Range type.
More information about the Digitalmars-d-learn
mailing list