We need better documentation for functions with ranges and templates

ZombineDev via Digitalmars-d digitalmars-d at puremagic.com
Tue Dec 15 02:01:55 PST 2015


On Tuesday, 15 December 2015 at 09:57:00 UTC, ZombineDev wrote:
>
> And then you have one of the most used methods - .Count:
> https://msdn.microsoft.com/en-us/library/bb338038(v=vs.100).aspx
>
> Where presumably, for the sake of simplicity, the docs don't 
> even bother to mention that it is almost always O(n), because 
> non of the Enumerable extention methods preserve the underlying 
> ICollection interace.

I honestly think that the documentation of walkLength in Phobos 
is much better, though an example would be nice:
https://dlang.org/phobos/std_range_primitives.html#.walkLength






More information about the Digitalmars-d mailing list