r/programming • • Apr 16 '21

Java is criminally underhyped

https://jackson.sh/posts/2021-04-java-underrated/
41 Upvotes

220 comments sorted by

View all comments

Show parent comments

13

u/Jwosty Apr 16 '21 edited Apr 16 '21

I'm looking at those papers and I don't see any that are researching the language itself (as opposed to the runtime or interesting computer science topics that could really be done in whatever language they wanted to use)... This just shows that Java gets used a lot in industry in academia. Which is true. Just because it's a popular choice of tool doesn't mean it's better. It just means that it'll get your job done (but you won't have fun along the way).

In other words, it's not the language doing the contributing here, it's the researchers. For some of those papers I'm seeing, you could also maybe say the JVM (i.e. the runtime) is excelling. Those researchers are excelling despite the language they're using.

Another way to say it: my CS book demonstrates a lot of concepts in Java. Does it do this because it's an amazing language? No. It does this because it doesn't really matter what language it uses as long as it's likely to be widely understood. They could have chosen whatever language they wanted. The only service Java is doing the academic types is the fact that everyone will know what they're talking about when they're demonstrating some interesting concept. You can show off priority queues in whatever language you want. Heck, sometimes it'll be assembly.

10

u/chrisgseaton Apr 16 '21

You're editing all your comments faster than I can reply to them!

If C# is blazing the trail with all these innovations then why aren't people publishing on them? I can answer that - because they aren't C# innovations.

I'll take just the first example you gave - generics at runtime. Who do you think blazed that trail? C#? Nope. Odersky and Wadler in 1997, three years before C# was conceived. In Java, with the Pizza paper. Blazing the trail for... C#.

9

u/AdministrationWaste7 Apr 16 '21

the fact that Java still doesn't have an equivalent to Linq, async/await or even structs isn't really selling me on this idea that Java is superior, especially in "innovations".

1

u/Muoniurn Apr 16 '21

Linq has questionable benefits, and I don’t see why it can’t be replaced by a library at the price of a bit uglier syntax. Async await is inferior to not having async await (it introduces needless function coloring). Project loom will be superior in every conceivable way. Basically, you can spawn as many threads as you want and they will automatically become non-blocking at IO calls. One part of structs is already delivered: records. The other (stack-allocation) is in the works by Project Valhalla, but it is quite hard to introduce it into the language without breaking backward comp.

→ More replies (0)