Frank Schönheit - Sun Microsystems Germany wrote:

>> So constant groups could be changed at any time with good confidence,
>> without considering this to be "incompatible". Without this explicit
>> declaration adding constants to groups actually is incompatible, though
>> we didn't AFAIK consider it to be so when we already added numerous
>> constants to several groups.
> 
> Does our watch dog bite when adding new constants to a *published*
> group? Never tried. Adding new constants to an unpublished group has
> never been a problem, by definition and in theory, since they were
> allowed to be changed incompatibly.

Yes, even published constant groups were allowed to be changed, but IMHO
the problems caused by that (or not caused by that) are the same as in
case of enums. We treated them differently, though there is no technical
reason. No language binding today would have a technical problem with an
extended enum as none of them really does boundary checks and breaks if
a "new" enum value is found (even C++). OTOH we can't exclude that any
future language binding might do that, but that is true for constant
groups also.

To avoid uncertainties I thought it might be a good idea to make it
clear that constant groups may be extended without considering that an
incompatible change and that all language bindings (and API users) must
take that into account, while enum changes are always seen as incompatible.

Strictly speaking, wanting to change an enum is a clear sign that this
type never should have been an enum in the first place. The
recommendation always was that the enum type should be used only for
enumerations that can be seen as fixed if only probable or forseeable
changes of the world around us are considered. Thus weekdays, month
names etc. are good candidates as odds are high that they don't change
in the life time of our API. ;-) Many enums in our API are wrong, it
seems that enum or constant group was chosen at random (e.g. in the
toolkit API).

Regards,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[email protected]".
I use it for the OOo lists and only rarely read other mails sent to it.


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

Reply via email to