[OT] Finding longest documents

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Oct 15 07:49:08 PDT 2008


Sergey Gromov wrote:
> Wed, 15 Oct 2008 09:17:57 -0500,
> Andrei Alexandrescu wrote:
>> I see how it breaks those conventions, but I've never heard of them. The
>> convention I heard of is that if you want dynamic polymorphism you use
>> classes, otherwise you don't.
> 
> How about if you want pass-by-value you use structs, otherwise you don't?  
> My argument against structs-collections is that I want to toss 
> collections around and build other collections out of them without 
> messing with pointers.

A struct can choose to implement value or reference semantics as it 
pleases. The only thing it can't readily implement is dynamic polymorphism.

Andrei



More information about the Digitalmars-d mailing list