Friday, October 12, 2007

Java Technology; So Simple!

The assertion facility in J2SE 1.4 and later versions is not a full-blown design-by-contract facility. Adding such a facility would require substantial changes to the language and might subvert the simplicity of Java technology.

Which naturally made me LOL out loud, as Java is anything but simple. The name alone refers to about sixteen different concepts simultaneously.

As an aside, if you want to actually use assertions in Java, make sure you turn them on! Use the "-ea" flag at the VM. They are off by default! Boo! I think this officially makes it the only runtime checking that is off by default in Java.