Kohei Yoshida wrote:
On Tue, 2007-08-07 at 13:35 +0200, Eike Rathke wrote:
And yes,
having to carry out this work is extremely nasty just to add some values
to an enum. And yes, this is the reason why I refrain from using enums
in new interfaces if there is only the slightest chance that another
value would had to be supported in future. Which makes enums pretty much
useless, IMHO.

Yes, very unfortunate.  I wonder if the UNO enums could have been
translated into constants just for Java binding, instead of using Java's
(obviously very limited) enum constructs...  But I guess we can't really
back out of it since it's already set and done.

To put this into perspective: The restriction to not add to published UNO enums is not due to any UNO languag binding limitations, but is a necessity for building robust software. In general, it is unknown what the existing users of a published UNO entity are, and a design choice of UNO is that a user of a published entity shall continue to work even after (valid) changes have been made to that entity. For an enum, adding new values would break existing consumers of that enum, that would not know how to handle the new values. Hence, extending a published enum is not considered a valid change.

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to