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

RE: Methods in the NIM requirements





Walter
I do not think it is correct to say that we do not need attributes if we have
methods.
They are both needed. Often attributes represent states that an object goes
through
when different methods are invoked and these are properties that should
be readable.
Lakshmi




"Weiss, Walter" <WWeiss@lucentctc.com> on 04/19/2000 04:22:15 AM

To:   "Joel M. Halpern" <joel@ivyplan.com>, nim@ops.ietf.org
cc:    (bcc: Lakshmi Raman/Telcordia)
Subject:  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.

Joel,

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.

regards,

-Walter