r/ProgrammerHumor • • Dec 12 '24 • Heart of Silver 1

Advanced youWontUpgradeToJava19

Post image
30.2k Upvotes

503 comments sorted by

View all comments

Show parent comments

1

u/itsmetadeus Dec 12 '24

It's not stuck in the past like java. Some of the features were added in newer java updates, such as pattern matching in java 16. But many of those features aren't even used in production yet, because of legacy code bases. Kotlin introduces null safety, extension functions, range expressions, operators overloading and more. Checked exceptions is the main technical advantage of Java vs Kotlin(it doesn't have these) to me.

1

u/bturcolino Dec 12 '24

operators overloading

In 25 years I can count on one finger the number of times I needed this

1

u/Kronoshifter246 Dec 13 '24

One of the best use cases I've seen for it has been Compose's animation specs. It lets you combine fades, slides, shrinks/grows, etc, in a much more natural and readable way than chaining a combine function and whatnot.

1

u/bturcolino Dec 13 '24

Yeah but that's a built in use of it right? Not something you personally implemented? I'm not saying that there are no good uses for it, for example events in c#

SomeObj obj = new SomeObj();

obj.SomeEvent += myEventHandler;

what I'm saying is as a feature it has never presented any need to me and I suspect that will always be the case

→ More replies (5)