Why is std.algorithm so complicated to use?

Christophe Travert travert at phare.normalesup.org
Tue Jul 10 10:09:09 PDT 2012


Jacob Carlborg , dans le message (digitalmars.D:171725), a écrit :
> On 2012-07-10 17:11, Christophe Travert wrote:
> 
>> What is wrong with foo.chain(["bar"])?
> 
> I think it conceptually wrong for what I want to do. I don't know if I 
> misunderstood ranges completely but I'm seeing them as an abstraction 
> over a collection. With most mutable collection you can add/append an 
> element.

That may be the source of your problem. ranges are not collections. They 
do not own data. They just show data. You can't make them grow. You can 
only consume what you have already read.



More information about the Digitalmars-d mailing list