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

Which is worthless without the wealth of the Java ecosystem, but apparently Java is a very bad language.


Can't the Java ecosystem be valuable and Java the language be bad at the same time?


It could, but Java the language definitely isn't bad. Sure, it's verbose, but it's pretty simple to grok overall.

I agree with pjmlp (and I don't even work for Oracle!). I think that once Java has caught up with pattern matching syntax, data classes, fully integrated Loom and Valhalla etc there really isn't a need for Kotlin on the server-side anymore.

For Native or frontend stuff it's definitely always going to have to play catch-up and try to shoehorn wildly different semantics into the same language somehow.

So I guess it'll end up as a niche language on Android, ultimately. Not necessarily a bad place to be, though!


It'll never get rid of everything-is-nullable, though. That's honestly my biggest issue with Java. I could definitely complain about a bunch of stuff with Java, but the nullability situation is the worst.

Also, everyone in this thread is talking about Loom and Valhalla. Are those actually going to land at some point? I was starting to assume they were vaporware.


There is a reason why many people (including me) perceive Java as relatively bad. The language paid a great deal of resources to keep backwards compatibility, which is definitely a thing. They couldn't even just remove the unsafe package even though it was specifically announced to not be compatible with future versions, because of big vendors.

And this has a price. Bad language features stay, they make it difficult to introduce new stuff. Also, Java is very conservative in picking up new things. Saying "once Java has caught up" ignores that Kotlin, at that point in time, will be even further ahead of Java most likely.

And both of them will never reach feature parity with Scala. ;)


I can't address your specific experiences with Java, Kotlin, or Scala but even just lambdas in just Java took a ton of wind out from beneath their wings.

It just hasn't shown to be a race to feature parity in practice. Enough of the Kotlin and Scala user bases just really do want a better Java, often in just one or two ways.

Personally, and more controversially, I don't think Java getting pattern matching in switches or sealed classes is going to move the needle a ton. (Sorry, Brian!) It's going to be Loom and Records that really change things.


> Saying "once Java has caught up" ignores that Kotlin, at that point in time, will be even further ahead of Java most likely.

This assumes that there is much "ahead" to get and that people want more features (well, some do, but the vast majority don't seem to). If the "catching up" terminology applies at all, it certainly doesn't mean feature parity with every other language. That's like a compulsive hoarder seeing a neighbour buying a lawn-chair and saying, "nice to see you finally catching up!" Once you've "caught up" with the expectations of the majority of programmers, there's not much more catching up to do. Neither Scala nor Kotlin have broken past 5% share of the Java platform, even when Java was behind mainstream expectations.

So sure, there will always be some small percentage who like more features than the mainstream fashion, but it's been clearly shown that you can't appeal to that minority and to the mainstream majority at once. Java (the language) tries to appeal to the latter, not the former.


> This assumes that there is much "ahead" to get and that people want more features (well, some do, but the vast majority don't seem to)

You have a point there - maybe the "catching up" is not relevant to the majority of the developers. I always find that surprising but I think you are right.


Fair, but regarding the catch-up: The main difference is that Java can actively improve things both on the language side and on the JVM side. Kotlin can only improve on the language side.


I'm excited for Scala 3! Scala needs a good cleanup.


Totally agree with that! Scala is already much more organized and consistent than both Java and Kotlin (no matter what some people think) but Scala 3 will make that even better - well except for the pyhton-like syntax part, haha.




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

Search: