Hiding class pointers -- was it a good idea?

Tristam MacDonald swiftcoder at gmail.com
Fri Aug 17 08:22:31 PDT 2007


Agreed, but I can't think of another language that supports this 
definition of OOP (apart from 'mutable' under C++ - which is widely 
regarded as a hack).

Alex Burton wrote:
> 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