Improving std.algorithm.find

sybrandy sybrandy at gmail.com
Tue Jul 20 16:03:12 PDT 2010


On 07/19/2010 10:18 PM, Andrei Alexandrescu wrote:
> On 07/19/2010 06:36 PM, sybrandy wrote:
>>> I think that the problem with find() is not so much find() but it's
>>> documentation.
>>> In all honesty, anything with a return type like FindResult!(Range,
>>> Ranges) is
>>> going to scare people off.
>>
>> I fully agree. I had no idea from the documentation what something like
>> this was: [1,2,3,4][]. The array documentation doesn't have any details,
>> so for the most part I've stayed away from std.algorithm because I don't
>> understand the return types very well. Better documentation would help a
>> lot.
>
> I agree as well. FWIW [1, 2, 3, 4][] is a workaround for a (now gone)
> bug in the compiler. That bug made [1, 2, 3, 4] a fixed-size array by
> default.
>
> I'll work on improving the documentation.
>
>
> Andrei
>
Muchas gracias from your loyal minions.

Casey


More information about the Digitalmars-d mailing list