Java is the Snubby-Nosed Scissors of Programming Languages

Here is an example from Arnold, Gosling, and Holmes that illustrates my point:

When you design a class, you can decide whether to trust its extended classes. The SortDouble class is designed not to trust them, and that is generally the best way to design classes for others to extend. A guarded design not only prevents malicious use, it also prevents bugs.

In other words, Java tries to make it safe so crappy programmers won't hurt themselves.

This, unfortunately, also prevents good programmers from doing good things.

Consider the "reflection" quality of the Ruby programming language. Ruby lets you define or redefine just about anything you want. Wish the String class did something different? Fine, you can rip it open and insert or replace any bits you want.

This, of course, is very dangerous. Nonetheless, it can be a powerful tool if used smartly and judiciously. Java doesn't even give you that option. It wants to keep you safe.

The problem with languages that try to keep the programmer safe is that bad programmers still generate crappy code, and the good programmers just get frustrated. I'm frustrated.

Rating

What do you think of this article? Please click the stars below to let me know.

Your rating: None

Trackbacks

Trackback URL for this post: http://www.unicom.com/trackback/411

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <img> <i> <b> <tt> <em> <strong> <cite> <code> <blockquote> <pre> <ul> <ol> <li> <dl> <dt> <dd> <i>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Each email address will be obfuscated in a human readble fashion or (if JavaScript is enabled) replaced with a spamproof clickable link.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
2 + 4 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.