On Tue, 2006-04-11 at 09:02 +0900, Carsten Haitzler wrote: > switch statements with no default: case (and an assumption that all the > members > in the switch are the only valid values and if no switch case is executed "bad > things" (tm) will happem) switching on EXTERNALLY provided values (ie from a > property read from x) are just fundamentally broken from the start - bugs > waiting to happen. i would not consider this an api break. it's an api > addition. the original code was/is broken. never trust data you read from > properties to always be correct and sane - nasty applications could try cause > havoc by maliciously mangling properties or simply bugs in software on clients > could do the same. reading x properties is like reading any protocol over a > wire to an untrusted client - you double check what you get and never assume > it is sane and correct. > > so my point - it's not a pi break at all adding extra enumerations. the code > should have already handled the case of an enumeration it doesn't know about > to > start with in some "sane" fashion. >
This is not about trusting values from properties (which of course, you must not do), it is about GDK apis which have a C enum for the possible values of the window type. Adding new values does indeed force us to break the api by adding new values to the enumeration. I do agree that the api break is minor and that we should probably do it, but it is an api break, unless the enumeration is explicitly documented as "may grow new values", which is isn't. Matthias _______________________________________________ wm-spec-list mailing list wm-spec-list@gnome.org http://mail.gnome.org/mailman/listinfo/wm-spec-list