Live data from Hacker News

Rating 26 years of Java changes

neilmadden.blog

1–10 of 327 posts

Re: Rating 26 years of Java changes

#4

> if you wanted to store an integer in a collection, you had to manually convert to and from the primitive int type and the Integer “boxed” class I have never worked with Java. What is this? Why would one want to have a class for an Integer?

It's because the collection types (and generics) don't support primitives, only objects. So you been to stuff the primitives into objects to use them with a lot of the standard library.

Re: Rating 26 years of Java changes

#5
Definitely underrates the impact of annotations. I'm personally not a fan of the way annotations are used to implicitly wire together applications, but I have to admit the impact. Maybe 5/10 is fair in light of the wide range of positive and extremely negative ways annotations can be used.

So many of these features were adopted after they were proven in other languages. You would expect that since Java took such a slow and conservative approach, it would end up with extremely polished and elegant designs, but things like streams ended up inferior to previous developments instead of being the culmination. Really disappointing. Java is now a Frankenstein's monster with exactly as much beauty and charm.

Re: Rating 26 years of Java changes

#9
post #5

Definitely underrates the impact of annotations. I'm personally not a fan of the way annotations are used to implicitly wire together applications, but I have to admit the impact. Maybe 5/10 is fair in light of the wide range of positive and extremely negative ways annotations can be used. So many of these features were adopted after they were proven in other languages. You would expect that since Java took such a sl…

I used to joke that the direction spring was heading was that you’d have an application be a boilerplate main method with a dozen lines of annotations. Then I actually encountered this in the wild: we had an app that sent updates from db2 to rabbitmq, and the application literally was just configuration via annotations and no actual Java code other than the usual spring main method.

Re: Rating 26 years of Java changes

#10

> if you wanted to store an integer in a collection, you had to manually convert to and from the primitive int type and the Integer “boxed” class I have never worked with Java. What is this? Why would one want to have a class for an Integer?

I think your intuition is correct: you probably don’t.

That’s also very likely changing. Lookup “project Valhalla”. It’s still a work in progress but the high level goal is to have immutable values that “code like a class, work like an int”.

PS When I say “changing”: it’s being added. Java tries hard to maintain backward compatibility for most things (which is great).

Post reply on HN