Wednesday, October 31, 2012

Java Misfeatures Collection

The Misfeature Collection blogging pattern again, applied to Java, the language.  Things big and small.

1) There should be a 'Integer' super-type for all the integer types (Byte, Short, Integer, Long). The name's taken, unfortunately. That's another misfeature, but understandable, 'int' was inherited from C/C++, I suppose. They could've named Integer as Int; and had Integer as the super-type name.

1a) Same thing for floating-points, of course. 'float' is traditional. But float could've been 'Single', IIRC there are languages that use 'single' as the name of single-precision FP numbers.

2) Annotations should fit in better with interfaces. Lots of good reasons for this; and only the 'tools' excuse on the other side, right?


No comments:

Post a Comment