[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Methods in the NIM requirements

> When I build actual objects, I almost always hide the attributes 
> completely, and use specific accessor operations.  But that 
> is not because 
> I want to hide the existence of the attribute.  It is because 
> the languages 
> all end up exposing more than just the attribute when I expose an 
> attribute.  To retain my flexibility of implementation, I 
> hide that under 
> an accessor.  But in the kind of information model we are 
> talking about, we 
> do not have this drawback.  So we can use the power of both 
> the attriubte 
> semantics and the operational (method) semantics where each 
> is appropriate.


It would seem then that attribute constraints are unnecessary because the
the method definitions provide those constraints as part of their
definition. Why bother defining attributes at all if you have method
definitions to specify the behavioural boundaries of the object? As you say,
the attribute definitions within an object define a specific implementation
of the object that is immaterial to the interface definition.