new documentation format for std.algorithm

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Feb 2 07:57:33 PST 2011


On 2/2/11 6:40 AM, spir wrote:
> On 02/02/2011 09:45 AM, Andrei Alexandrescu wrote:
>> Following ideas and advice from this newsgroup, I have a draft at
>>
>> http://d-programming-language.org/cutting-edge/phobos/std_algorithm.html
>>
>> There are two tables, one with just the names and the other with names
>> and a
>> brief description. Let me know of any feedback. Thanks!
>>
>>
>> Andrei
>
> Waow! This is a great leap forward on the way to clear, useful, &
> welcoming documentation. Thank you very much :-)
>
> On the other hand, it lets me wonder about Phobos organisation: many of
> those funcs apply on ranges, right? Thus, why are they not in std.range?
> Why define types on one hand, their functionality on the other? The
> consequence is, when importing std.range, one also must import std.algo
> in most cases (and often std.functional, std.typecons,...).
>
> One problem is most of those algos apply on other kinds of sequences or
> "iterable" collections as well (arrays, sets, trees...): shouldn't there
> be kinds of supertypes or interfaces?
> Another problem is std.range already is over-populated; which may raise
> other kinds of questions.
>
> Denis

std.algorithm implements what's traditionally considered an "algorithm", 
a process. std.range implements range paraphernalia. A notable exception 
is that binary search algorithms are in std.range because they belong to 
a specialized range.

I'm not sure how to improve on this.


Andrei


More information about the Digitalmars-d mailing list