Code's Worst Enemy - http://steve-yegge.blogspot.com/2007...
Dec 19, 2007
from
"Bigger is just something you have to live with in Java. Growth is a fact of life. Java is like a variant of the game of Tetris in which none of the pieces can fill gaps created by the other pieces, so all you can do is pile them up endlessly."
- ⓞnor
I strongly disagree about the "Java sux, Lisp is awesome" conclusion, though. Core language doesn't matter nearly as much as style, IMHO. But the Java community does seem particularly embracing of boilerplate.
- ⓞnor
This is a looong post. The author's summary: javascript (Ecmascript 4) is probably the best JVM language in terms of familiarity and code size (est. 2-4 times smaller code than Java)
- Sanjeev Singh
Java's only metaprogramming facility is reflection, which is not only extremely verbose (in Java), but also has a host of other problems. If Java had closures and maybe also macros it'd be much easier to avoid the bloat, but as Steve points out the Java community can't even agree to add closures. That said, JavaScript wouldn't be my first choice for an alternate JVM language.
- Laurence Gonsalves
There's always code generators, but I'm guessing you don't count that as "metaprogramming". :)
- ⓞnor
If his goal is maintainability, I'm not sure metaprogramming is the way to go. duck typing helps a lot though; no more wishing people had declared their class as implementing a particular interface.
- Karl Rosaen
Code generation is metaprogramming, but isn't "provided by Java" -- it's something people have to build on the side from scratch. (I've been working on a Java code generator for a number of years now, BTW) Java is actually somewhat hostile to code generation (eg: no #line directive, and JSR-45 is teh sux0rz), and the growing popularity of IDEs in the past few years has made it more difficult because IDE users expect their IDE to do the building, but the IDEs don't have simple mechanisms for plugging in code generators.
- Laurence Gonsalves