Java as a crutch for weak programmers
I often see Java compared to ‘more powerful’ languages — i.e., languages that allegedly allow expert programmers to do amazing things, but let bad programmers screw up*. The idea is that Java is the embodiment of a tradeoff: it stops you you making whole classes of errors at the expense of being unable to do whole classes of ‘expert’ things (for example, working with pointers, using higher-order functions, or any kind of macrology). Because of this it's a great languages for teams, where (it is suggested) not everyone can be an expert.That's the story, anyway.
I read Dorothea Salo's blog. She has to program in Java as part of her job, and I'm sure she wouldn't disagree with me when I say she's not an expert programmer. Hell, I'll quote her:
I found it interesting, then, when her dislike of Java spilled out into precisely the above area of comparison:Look. I am not a very good programmer. Let's just take that as read, okay?
Sorry for the heavy quoting, but it makes the point, no?Yeah, yeah, I said I hated Java. Well, I don’t any more.
I LOATHE THIS LANGUAGE WITH A PASSION THAT BLAZES UNCONTROLLABLY.
Oh my $DEITY, how many more things could they have designed into this language that make it easy for me to screw things up? Interfaces, decorator classes on every little freakin’ thing (the gyrations necessary to get a string out of a file have to be seen to be believed), wrappers all over hell’s half-acre ($DEITY forbid I just not give a damn what kind of number I’m seeing at any given time…), special rules for primitives (… or whether it’s an object or not…), Stupid Exception Tricks…
Look. I am not a very good programmer. Let’s just take that as read, okay? I screw things up enough all by myself. I want a language that lets me get stuff done in spite of my well-known tendency to screw things up, and gets out of my way otherwise.
So: Dorothea has to jump through hoops to process files, and still makes errors. I, meanwhile, can't do any of the elegant tricks that I'm used to from Lisp, and feel terribly restricted (not to mention having whole regions of solution spaces off-limits to me because of missing features)**.
Given that the only remaining advantage of Java — its massive library support — seems mainly to counterbalance the fact that implementing those libraries yourself in Java would be a huge amount of effort, I need reminding: what's the point of Java again?
*Languages I've heard in this category are Lisp, C, Haskell, and other functional languages. C, of course, is low-level, but it's powerful in its own way. C++ I would be disinclined to include — any language that has whole reference shelves devoted to not screwing up simple things is really not to be recommended.
** I'm not saying that I'm an expert programmer, but I'm probably not a code monkey. In fact, if I were a bad programmer, it would probably only strengthen my point, no?
Posted at 2006-09-10 19:52:00 by Richard • Link to Java as a crutch f…
Comments, trackbacks.
