On Mon, 12 Oct 2015 10:41:22 +0200
Erik De Rijcke <derijcke.e...@gmail.com> wrote:

> Adding enum members is backward compatible for Java. If you compile against
> an enum with 2 members, and later on a new member is added, you can simply
> use the new version of the enum.
> 
> Important however is that the order of old members do not change when new
> members are added.

This is important. I don't think anyone has ever mentioned anything
like this before.

We certainly have not expected the order to matter inside an <enum>
tag, since we require the value to be explicitly given. Not when you
are coming from C, anyway.

Apparently we would need to start enforcing the rule:

        "Only ever add new enum value to the end of a closed enum."

Yeah, now we also need the concept of open and closed enums, because
for something like used in xdg-shell for window states, the whole enum
concept doesn't work e.g. in Java (I hear).

Should we be adding all these to the Wayland XML language or not?


Thanks,
pq

Attachment: pgpHONLY0Z_zc.pgp
Description: OpenPGP digital signature

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to