Why is std.algorithm so complicated to use?

Simen Kjaeraas simen.kjaras at gmail.com
Tue Jul 10 11:02:12 PDT 2012


On Tue, 10 Jul 2012 17:21:14 +0200, Christophe Travert  
<travert at phare.normalesup.org> wrote:

> "Simen Kjaeraas" , dans le message (digitalmars.D:171678), a écrit :
>>> Well, I haven't been able to use a single function from std.algorithm
>>> without adding a lot of calls to "array" or "to!(string)". I think the
>>> things I'm trying to do seems trivial and quite common. I'm I  
>>> overrating
>>> std.algorithm or does it not fit my needs?
>>>
>>
>> bearophile (who else? :p) has suggested the addition of eager and  
>> in-place
>> versions of some ranges, and I think he has a very good point.
>
> That would have been useful before UFSC.
> Now, writing .array() at the end of an algorithm call is not a pain.
>
> int[] = [1, 2, 2, 3].uniq().map!toString().array();
>

Please tell me how that is in-place.

-- 
Simen


More information about the Digitalmars-d mailing list