News for hackers. Stuff that matters.
Re:Evolving Java Without Changing the Language by jerf on Wednesday October 21, 2009 @06:30PM (#895785)
Actually, it isn't that great coders can't write great code in Java, it's that great coders, having virtually by definition a certain amount of experience in a wide variety of languages, require a lot of incentive before they'll choose to write their great code in Java, where the language is fighting them every step of the way.

Some people have managed to put out the necessary incentives, so such code does exist, but seeing a putatively great coder reach for Java as their first choice without such incentives is like seeing a putatively great coder reach first for Cobol... it pretty much proves they aren't a great programmer. Even if you want the JVM libraries, there are better ways.

Yeah, it's an opinion, but it's one from someone with the aforesaid experience in a lot of languages. It's like saying a great marathon runner can run a marathon in concrete shoes. Yeah, maybe they can, but seeing them choose it of their own free will would say an awful lot about their wisdom in shoe choice. Java is a language that simply loathes great code.

Besides, you seem to have missed the core point that optimizing the language for a case that doesn't come up often is a misfeature, no matter how you slice it. Optimize the language for the case that occurs most. "var X"-type syntaxes cover that. "var X" still works in your example, too; there's no reason that a smart compiler can't deal with that sort of separation between declaration and initialization.

Re:Evolving Java Without Changing the Language by axod on Wednesday October 21, 2009 @06:39PM (#895798)
Well, agree to disagree :) I've used a fair number of languages, and don't really understand the java hate. There's far uglier languages to look at. But then I love writing in assembly - which some feel overwhelmed with.

Personally it seems like some programmers at some point dislike being restrained by anything and become slightly high and mighty about the whole subject - the whole "Unless you use lisp, you can't understand why lisp is the best language" BS.

Why is "var X"-type syntax better? Why does that create better code :/ Sorry, I don't buy it. "var X" would be less precise, and less useful than specifying the explicit type you want.

FWIW, I just checked for fun my own comet server written in Java against tornado (Python). Very similar functionality, except the Java one is a smaller codebase. It's as verbose as you want it to be.

Re:Evolving Java Without Changing the Language by eru on Wednesday October 21, 2009 @07:14PM (#895857)
> "Unless you use lisp, you can't understand why lisp is the best language"

Of course we all know that Lisp is just a semi-imperative hack. Real programmers use something more pure like Clean or Haskell nowadays.

Anyway, I just wanted to applaud you two for the civility ouf your discourse. It was an informative read.