Am Freitag, den 04.03.2005, 11:22 +0100 schrieb Christopher Oezbek: > On Fri, 4 Mar 2005 10:45:13 +0100, Thomas Zander <[EMAIL PROTECTED]> wrote: > > > if future versions define another item then you can still > > _set_ that item on an older version without getting an exception. > > It just won't do what you expect it to do. Which in this case isn't > > halve > > bad. > > In the future enums should solve that problem it seems. With them you can > add items without forcing older clients to recompile and they make it hard > to set invalid values :)
While this is true in general, this does not apply to the standard libraries. In an ideal world every occurance of ints for enum-like constructs should be replaced by real enums, but this cannot happen in java.* and javax.* for backwards compatibility. All the crap that was once coded into the standard library will probably stay there forever. Only in very rare cases Sun significantly changes odd behavior (example: getContentPane() in JFrame in 1.5) /Roman
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
_______________________________________________ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath