| 2005 01 03 |
Critic of Java HotSpot source code
- The runtime source code is 3 million lines of Java and C++. That's way too much for what it does.
- Code duplication and copy and paste coding is routine. The HotSpot compiler includes an XML output class, written in C++. There is a regexp implementation in sun.misc, different from java.util.regexp. There's at least a half dozen implementations of UTF8 encoding/decoding in the various C++ and Java layers. There is a huge amount of code, obviously copy/pasted then search and replaced, to handle different primitive types in different situations
- A lot of preprocessors are used. This includes a mix of awk, sed, shell scripts, and indeed, Scheme! Yes, the JVM source includes jscheme.jar, used to generate some CORBA classes. Considering that Sun talks about how bad preprocessors are, its hypocritical of them to use preprocessors, especially half-baked crappy hacks involving awt and sed, on the Java code base!...
Slava Pestov's blog post via Chris Double.
|