Re: DOM Range comments

>Why the Java binding is getIsCollapsed() ?

Interesting point.

The standard Java (or, more accurately, Java Beans) design pattern is that
getters for boolean properties have names which follow one of two patterns,
either getWhatever() -- as for any other property -- or isWhatever().  If
the attribute's name is isCollapsed, then getIsCollapsed() may be confusing
but does follow Java's conventions.

isIsCollapsed() would be even more confusing, of course, but would still be
formally "correct".

I'm not delighted by the idea of making this a special-case in the
conversion from abstract design to specific language bindings; I like the
consistancy we've maintained so far. But it might be worth considering
changing the property name from isCollapsed to simply collapsed. That would
undo this minor cognative clash, and I don't think it would adversely
impact comprehensibility of code.



______________________________________
Joe Kesselman  / IBM Research

Received on Tuesday, 28 December 1999 21:03:57 UTC