[OT] Finding longest documents

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Oct 14 18:34:50 PDT 2008


Christopher Wright wrote:
> Actually, I STRONGLY urge that nobody use this heap.
> 
> It's a struct. If you access it by value and append to it, then access 
> it from any other alias, you will erase a random element from the heap.
> 
> If it were a class, this would not be possible. As I implemented it, it 
> would not be possible.
> 
> Containers as value types is such an idiotic idea for precisely this 
> reason.

I'd say this statement reflects a lack of understanding of value types, 
rather than value containers are an idiotic idea.

Andrei



More information about the Digitalmars-d mailing list