On Tue, 13 Oct 2015 20:27:58 +0100 Auke Booij <a...@tulcod.com> wrote:
> On 13 October 2015 at 16:19, Solerman Kaplon <soler...@gmail.com> wrote: > > Em 13-10-2015 11:35, Nils Chr. Brause escreveu: > >> > >> In C++ the order doesn't matter either, since each entry has a defined > >> value. I wonder why this is different in Java? > I really don't understand this discussion. Is the claim that the usage > of enums in java is problematic, because inserting a new value in an > existing enum might change the index of later values, thereby creating > an inconsistency? Yes, this is how I understood the problem from the irc discussion, indeed. > If so, all I can say that clearly the object you want to associate > with wayland-style enums is not whatever Java has invented for an > "enum". The values that are associated to names inside wayland enums > are very clear-defined, and if a language cannot safely couple names > back to values, then that is a language that does not understand the > concept of a variable. If this is a fundamental problem about Java > enums, you better find a way around it, but I don't see how this is in > any way a problem on the wayland side: there are enums, and enums > contain names, and those names have values. > > But if this is indeed the issue you are discussing, then this must > have already been a problem before the introduction of additional XML > attributes. > > Can we agree on the following? Until there is any firm specification > of open/closed enums, every enum should be considered open, and > although some legal values might be listed, others might not be, and > some might only be legal sometimes. New values may be added (but not > changed or removed) to protocol specifications without introducing any > compatibility issues. FWIW, I would be happy with that. Solerman, you forgot to reply-to-all. I added back the CCs. Thanks, pq
pgpLYZkTEJb3d.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel