Hacker News new | past | comments | ask | show | jobs | submit login

Java learned a ton from previous language's mistakes. The fact that it's ubiquitous, not perfect, has traditionally been slow/judicious to adopt new features (good), and hasn't had a release in the better part of a decade (bad) , amplify the perception of it's flaws.

Compare Java to C++, for example -- the top 5 things that annoy me about C++ are mostly fixed in Java (#ifdef, STL inconsistency, .h and .cpp files for one class, destructors, bounds checking..)




> Java learned a ton from previous language's mistakes

No. It only "learned" from C++'s mistakes, if even that, and threw out the baby with the bathwater (threw out templates but tamer generics as well, threw out non-nullable references, threw out context management — RAII or other)

> The fact that it's ubiquitous, not perfect, has traditionally been slow/judicious to adopt new features (good), and hasn't had a release in the better part of a decade (bad) , amplify the perception of it's flaws.

No, the fact that it's full of flaws that have been criticized from the start does that.

> bounds checking..

Java didn't fix bounds checking, they only fixed the memory unsafety of it, because Java is a GC'd language and therefore memory safe by default.


Well, there's no pleasing some people. I bet Gosling's pretty happy with how it went over the last 15 years, though.

Personally, I think throwing out templates is exactly what should have been done. And Java has generics.

What other lessons were they supposed to learn according to you, exactly?


> Well, there's no pleasing some people. I bet Gosling's pretty happy with how it went over the last 15 years, though.

Sure, if his goal was to create a super popular enterprisey language, to create the son of Cobol and to bring mainstream language improvements to a shrieking halt for a decade, he succeeded admirably on all counts.

> Personally, I think throwing out templates is exactly what should have been done. And Java has generics.

If you can't even be arsed to read what you reply to, I don't think there's any point in me continuing.


If you're just going to make ad hom accusations, there's no way of pleasing you.

I addressed templates, which to the extent I've seen them, are a confusing nightmare. You can say that's because I'm not smart enough, but I'd retort that I don't want to debug something that smart.

Non-nullable references you can make a case for, but but it's minor and you can also say 2 types of references complicates things much more than one type of reference. Java dodges all kinds of confusion by only having one kind. And context management, which is such a relic that I had to google it, seems to be a hack to make memory management easier to deal with. Again, clever, but I'm not sure I want to debug it. How about avoiding static state and dodging the whole problem.

Java has 50 keywords total, including "void" and all primitive types, and it can do almost all of what C++ can. Yes, the OO model is a product of 1995. See smalltalk. EJB is "enterprisey", Java is not. And all organizations, regardless of hipness, need maintainable code.

Anyways, certainly nothing is perfect, so I'd love to hear more thought-out reasons why Java sucks.




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

Search: