C# code sample
spam at here.lot
Wed Jan 26 04:49:27 PST 2011
> Hi i come from a c# background
> I would like to write the following code in the according D style but i'm not
> sure howto do it
> c# code:
> void foo(IEnumerable<double> data)
> foreach (var d in data)
> 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.
More information about the Digitalmars-d-learn