Disable GC entirely

Dicebot m.strashun at gmail.com
Wed Apr 10 01:11:26 PDT 2013


On Wednesday, 10 April 2013 at 06:03:08 UTC, Manu wrote:
> A base class typically offers a sort of template of something, 
> implementing
> as much shared/common functionality as possible, but which you 
> might
> extend, or make more specific in some very controlled way.
> Typically the base functionality and associated accessors deal 
> with
> variable data contained in the base-class.

I believe that template mixins + structs are much more natural 
way to express this concept. Basically, if you need inheritance 
only for code reuse, you don't need inheritance and all 
polymorphic overhead. D provides some good tools to shift away 
from that traditional approach. Those can and should be improved, 
but I think the whole concept "classes are polymorphic virtual 
reference types, structs are plain aggregates" is very solid and 
area of struct-only development needs to be explored a bit more.


More information about the Digitalmars-d mailing list