On 03/09/09 11:45, Frank Schönheit - Sun Microsystems Germany wrote:
Hi Andre,

I wonder if Size, IsEmpty, and KeySet really should be attributes.
They are marked as readonly so I half expect them to be also immutable. Especially so as they are listed below KeyType and ValueType which probably are immutable.

Is this how attributes can or should be used?

Interesting question. I cannot really give a convincing argument why I
chose attributes for this - it's just that I tend to use attribs for
read-only facets.

Opinions? Anybody who knows rules for when to use attributes vs. methods?

No rules. However, using read-only attributes instead of methods to retrieve volatile data, while technically OK, looked odd to me, too.

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to