Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's funny. As I was reading the slides, I was thinking about just how unconfident (in the sense of the presentation) most Java appears to me. I'm thinking specifically of the messily nested try/catch/finally blocks needed when creating a JDBC connection (finally cleaned up a little in 1.7). Or perhaps the abundance of stuff like

  if (foo != null and foo.getSomething()) {
or even weird little conventions that you get used to, like

  if ("".equals(aString)) 
I think with some effort, you can avoid some of this sort of thing, but it's not always easy.

(Or, perhaps you didn't intend to include Java as a member of the set "decent statically typed languages?" ;))



Java isn't the best example, no :-) For example, its checked exceptions basically force dealing with them all over the code (if you want a nice API without seventy throws clauses, that is). The equals example you're giving is horrible indeed.

My personal favourite, which is C# at the moment, also has the "null" misdesign so you're right about that. Still, none of the duck typing issues exist (other than the null checking, which admittedly does undermine my point). Also, the IDE helps you do it right, which gives you more confidence as you write the code.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: