<div dir="ltr">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.<div><br></div><div>Important however is that the order of old members do not change when new members are added.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 8, 2015 at 10:27 PM, Daniel Stone <span dir="ltr"><<a href="mailto:daniel@fooishbar.org" target="_blank">daniel@fooishbar.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<span class=""><br>
On 8 October 2015 at 21:13, Daniel Stone <<a href="mailto:daniel@fooishbar.org">daniel@fooishbar.org</a>> wrote:<br>
> On 5 October 2015 at 21:31, Victor Berger <<a href="mailto:victor.berger@m4x.org">victor.berger@m4x.org</a>> wrote:<br>
</span><span class="">>> In this case, for a "closed" enum, the binding can decide to ignore any<br>
>> value received on the wire that is not described in the XML, as anyway, the<br>
>> client would not know what to do with it (and if they knew, they should be<br>
>> using a more recent version of the binding).<br>
><br>
> This should never happen. The compositor is responsible for tracking<br>
> which version the client has bound, and not sending it values it<br>
> doesn't know what to do with.<br>
><br>
> I've heard mention that xdg-shell allows this, but I also can't see it<br>
> anywhere in the spec. Jasper?<br>
<br>
</span>Whoops ...<br>
<br>
9:18 PM <Jasper> daniels, sorry, what were we talking about with enums?<br>
9:20 PM <daniels> Jasper: people are concerned that xdg-shell has<br>
'open' enums, in that a compositor can send a configure event with<br>
enum values unknown to the client<br>
9:20 PM <Jasper> daniels, that's correct<br>
9:20 PM <daniels> Jasper: bollocks, really?<br>
9:20 PM <Jasper> daniels,<br>
<a href="http://cgit.freedesktop.org/wayland/weston/tree/protocol/xdg-shell.xml#n321" rel="noreferrer" target="_blank">http://cgit.freedesktop.org/wayland/weston/tree/protocol/xdg-shell.xml#n321</a><br>
9:23 PM <daniels> Jasper: ah, i see - that does make quite a bit of sense<br>
9:23 PM <daniels> Jasper: but i do wonder if we should bound that by<br>
what the client actually supports, e.g. don't send gnome-specific<br>
values unless the client has bound gtk_shell<br>
9:23 PM <Jasper> daniels, the state mechanism is designed to solve a<br>
very specific race condition, so we don't want people inventing their<br>
own protocols to do the same.<br>
9:24 PM <daniels> Jasper: oh, indeed<br>
9:24 PM <Jasper> daniels, I would be fine with that, but I'm not sure<br>
it helps Rust clients.<br>
9:24 PM <daniels> Jasper: indeed, more of a general musing<br>
9:24 PM <daniels> Jasper: thanks for pointing that out; not sure how i missed it<br>
<br>
How does that play with Java/Haskell/etc? Would that just degenerate<br>
into a plain undecorated uint, or ... ?<br>
<br>
Cheers,<br>
Daniel<br>
</blockquote></div><br></div>