What are five things you hate about your favorite language?

There's been a cluster of Perl-hate on Stack Overflow lately, so I thought I'd bring my "Five things you hate about your favorite language" question to Stack Overflow. Take your favorite language and tell me five things you hate about it. Those might be things that just annoy you, admitted design flaws, recognized performance problems, or any other category. You just have to hate it, and it has to be your favorite language.

Don't compare it to another language, and don't talk about languages that you already hate. Don't talk about the things you like in your favorite language. I just want to hear the things that you hate but tolerate so you can use all of the other stuff, and I want to hear it about the language you wished other people would use.

I ask this whenever someone tries to push their favorite language on me, and sometimes as an interview question. If someone can't find five things to hate about his favorite tool, he doesn't know it well enough to either advocate it or pull in the big dollars using it. He hasn't used it in enough different situations to fully explore it. He's advocating it as a culture or religion, which means that if I don't choose his favorite technology, I'm wrong.

I don't care that much which language you use. Don't want to use a particular language? Then don't. You go through due diligence to make an informed choice and still don't use it? Fine. Sometimes the right answer is "You have a strong programming team with good practices and a lot of experience in Bar. Changing to Foo would be stupid."


This is a good question for code reviews too. People who really know a codebase will have all sorts of suggestions for it, and those who don't know it so well have non-specific complaints. I ask things like "If you could start over on this project, what would you do differently?" In this fantasy land, users and programmers get to complain about anything and everything they don't like. "I want a better interface", "I want to separate the model from the view", "I'd use this module instead of this other one", "I'd rename this set of methods", or whatever they really don't like about the current situation. That's how I get a handle on how much a particular developer knows about the codebase. It's also a clue about how much of the programmer's ego is tied up in what he's telling me.

Hate isn't the only dimension of figuring out how much people know, but I've found it to be a pretty good one. The things that they hate also give me a clue how well they are thinking about the subject.


Five things I hate about Java:

  • No first-class functions.
  • No type inference.
  • Lack of sane defaults in eg graphics.
  • NullPointerException not containing more information about what is null.
  • The proliferation of pointlessly "configurable" frameworks/service provider interfaces/factory classes/dependency injection systems. The configurability is almost never used, DRY is violated egregiously, and code quadruples in size and halves in legibility.
  • I know, I should check out Scala.


    Wow, I'm surprised that SQL hasn't made it up here yet. Guess that means nobody loves it :)

  • Inconsistent syntax across implementations
  • Subtle code differences can have massive performance ramifications for seemingly obscure reasons
  • Poor support for text manipulation
  • Easy cost of entry but steep learning curve towards mastering the language
  • Minimal standardization across the community for best practices, this includes syntax style.
  • ...And a few bonus reasons to hate it, at no extra charge

  • the WHERE clause goes last, making it easy to prematurely execute an UPDATE or DELETE, destroying the whole table. Instead, the WHERE should go somewhere up front.
  • It's difficult to implement relational division.
  • I can set a value to NULL, but I can't test it for equality with NULL. I can check IS NULL, but that just complicates code -- needlessly so, in my opinion.
  • Why do we need to completely respecify the formula for a GROUPed column, rather than setting an alias on the column and then GROUP BY the alias (or column index as with SORT)?

  • JavaScript :

  • All the coolest things are insanely complex, but then, all the coolness is also wrapped up in such a small amount of code that you feel stupid for struggling to follow it

  • '+' is an absurd choice of operator for concatenation in a weakly-typed language. Were they trying to scare off the noobs?

  • It's a cross-browser compatibility minefield (never mind if it's even turned on or not)

  • It's generally untrusted - associated with scummery such as blocking the back button, pop-ups that never die, etc.

  • It's nearly impossible to debug because there are only a few different error messages and a few different types (Number, String, Object, etc.)

  • If it wasn't for jQuery, I'd probably still hate it as much as I used to :)

    链接地址: http://www.djcxy.com/p/3492.html

    上一篇: 你最有争议的编程意见是什么?

    下一篇: 你讨厌你最喜欢的语言有什么五件事?