struct inheritance

BCS ao at pathlink.com
Mon Sep 3 07:43:28 PDT 2007


Reply to Regan,

> Bill Baxter wrote:
> 
>> The reason these should be structs is because sometimes you want to
>> add in maybe one or two small data members that control operation.
>> For instance you might have a 'compare' function in the traits and
>> want to parameterize it by a data member to act like either less-than
>> or greater-than.  Such things should have value semantics.
>> 
> The proposed struct inheritance only inherits fields, not
> methods/functions though, right?


Why? That's not how I would want to do it.
> 
> Regan
> 





More information about the Digitalmars-d mailing list