Hiding class pointers -- was it a good idea?

Alex Burton alexibu at mac.com
Fri Aug 17 05:55:07 PDT 2007


Walter Bright Wrote:

> 1) inheritance
> 2) polymorphism
> 3) encapsulation

Another one in that list should be "reference", which IMO would be assumed by most people, but has been lost with transitive const in D.
I would define it as the ability to not encapsulate something a class has a reference to.
By making all objects that an object has references to necessarily part of that object, the transitive const feature means that the only state relationship a class can have to another class is encapsulation.

Correct me if i'm wrong :) 



More information about the Digitalmars-d mailing list