Live data from Hacker News

Java 12

jdk.java.net

191–200 of 478 posts

Re: Java 12

#191
post #26

Earlier quoted context omitted.

8? I see more 7 or even 6. Until recently I actually thought 8 was the latest until I needed to develop a small project and discovered we were at 11. Actually, looking at the version history, I guess it's not weird that I thought 8 was pretty recent, as until 1.5 years ago (Sept '17) it was actually the latest and it is still supported until 2020 (unlike 9 and 10). v6 2006 2007 2008 2009 2010 v7 2011 2012 2013 v8 201…

Java 8 is supported until 2023. Funny enough, Java 11 will be end of life the following year. It's not even worth migrating to, better jump to java 15 then. https://access.redhat.com/articles/1299013

Java 11 isn't worth migrating to because it's end of life is 2024, more than 5 and a half years from now? That's a little extreme.

Re: Java 12

#192

I understand why Java has to keep on chugging along, but I feel bad for the people that have to be a part of it. It's like watching people keep coal trains going while people are moving to cars. Why? Besides being owned by Oracle, which is enough of a reason to never use Java ever again, it's also lost the niches that brought it into existence. Java no longer runs everywhere. Java on the web is dead, and you can now…

The JVM powers Kotlin, Scala, and Clojure, which are all as sexy as golang.

way sexier actually

Re: Java 12

#193

Earlier quoted context omitted.

> But it's extremely fast compared to anything but Go, C#, and "low level" languages nobody wants to touch for web stuff. Fast is a poor word to talk about benchmarks between languages. Memory, throughput, latency are the things we should be talking about. There’s also trade offs where predictable scaling of latency under massive load is important (Erlang, Elxir), or spending less memory and starting up quickly in or…

Java would take the cake in almost anything speed measure you mentioned. Golang is the only one comparable in memory throughput and latency. Java with async IO like Vert.X can do higher concurrency than Erlang. As can Go. IMO Java is the most well rounded language, but I'm not trying to convince you of that. Also there's nothing with java that stops threads from being restarted. In a modern web framework it's virtual…

Can do higher concurrency is a nonsensical phrase. Please show me your benchmarks versus Erlang at 10M web socket connections.

You’re not understanding what I’m talking about when I say restarting. I’m talking about the JVM process. I also just said hot reloading is counter to modern practices.

You’re not understanding what I told you.

Re: Java 12

#194
post #49

Earlier quoted context omitted.

Ironicaly I'm the other way around. Java is a pretty good platform, save the GC pauses. However I really dont see what benefits Spring brings. Spring Boot is great for prototyping and trivial apps, but for big systems you really want to break it apart. DI is better done with ServiceLocators. Some of the smaller libraries like Spring Shell, Spring Mobile are junk. And I still see lots of XML config that you dont know…

I am not sure what else are you looking for, Spring boot/cloud has pretty much all you need to build any application.

I know Spring and Spring boot are very popular, but I don't understand why. The Spring Boot home page says, "Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run"."

What does that mean? What does Spring Boot give me that Tomcat doesn't?

Re: Java 12

#195

Earlier quoted context omitted.

I'm not sure if you're trolling so I'll try to keep this short. Java is old, it's crufty. Yes. But it's extremely fast compared to anything but Go, C#, and "low level" languages nobody wants to touch for web stuff. The JVM is also extremely reliable. I've seen apps run for years straight. And the tooling is better than basically anything. Profiling, debugging, realtime code generation and modification. Libraries for…

> There's many valid critisicms of Java... Yes there are. ...but the parent assertion that Java will one day be like cobol; no longer taught in intro to CS course (where now we see python), considered bloated and legacy, and not picked for new projects (where we see the rise of languages like kotlin eating into what was once the primary growth for the language with mobile apps) and encumbered by problematic licensing…

I agree that the future looks bright for Kotlin and C# .Net Core especially. I'm also a big fan of Typescript but JS derivatives are missing many nice things like threading.

But I disagree that Java is like Cobol. The syntax and general situation is extremely similar to C++. There's still tons of work being done on it, but it's a mature language that will be around for decades. IMO it's still the best language to run on the server for a multitude of reasons.

Re: Java 12

#196
post #84

Earlier quoted context omitted.

Their lower end target is 10 ms. In a game, 16 ms is your entire time budget.

10 ms isn't all that much. When games load in assets they'll do various things like malloc huge chunks and you lose a few frames. If GC only causes occasional (maybe every 2 minutes) loss of a frame or two it should be no problem. If you watch benchmark FPS traces that count every frame delay you'll see that occasional stutters happen in basically every game. Loss of a single frame just isn't noticeable

> When games load in assets they'll do various things like malloc huge chunks and you lose a few frames.

Streaming/Loading assets in the main render thread is a very 2005 thing to do.

Re: Java 12

#197

Switch expressions prepare the way for pattern matching ( https://openjdk.java.net/jeps/305 ), instead of `instanceof` checks and casts. But (in my naive opinion) double dispatch seems a more elegant and java-ry solution, i.e. polymorphism on argument classes, so different methods are invoked for different object runtime classes (instead of using the compiletime type of the variable). The switching could be optimised…

That kind of multiple dispatch would be far more disruptive at several levels, and still wouldn’t really get you where you want to go without a lot more compiler and JIT magic.

Sure, you could match on types, but you wouldn’t be able to extend that to destructuring patterns, or regsxps as patterns on strings, or so many other ways patterns may be extended in future releases.

Re: Java 12

#198
post #27

Earlier quoted context omitted.

GC pauses have been one of the major barriers to using garbage collected (read: higher-level) languages for game development. This could open up the JVM for games, which could have some exciting implications.

Honestly, if you need real performance when writing a game, there's no reason not use the language that's most popular for your engine of choice. Mostly that's gong to be C++ with python scripting.

And Lua scripting

Re: Java 12

#199

Earlier quoted context omitted.

Java would take the cake in almost anything speed measure you mentioned. Golang is the only one comparable in memory throughput and latency. Java with async IO like Vert.X can do higher concurrency than Erlang. As can Go. IMO Java is the most well rounded language, but I'm not trying to convince you of that. Also there's nothing with java that stops threads from being restarted. In a modern web framework it's virtual…

Can do higher concurrency is a nonsensical phrase. Please show me your benchmarks versus Erlang at 10M web socket connections. You’re not understanding what I’m talking about when I say restarting. I’m talking about the JVM process. I also just said hot reloading is counter to modern practices. You’re not understanding what I told you.

Newer versions of Java cache compiled classes. The startup time is maybe 10 seconds for something big running Java 11.

You can also compile AOT for some performance loss at runtime but zero startup time. Android has been doing this forever but you can also do it on a PC using Graal.

And yes Java will destroy Erlang at concurrent connections if you use an async framework like Vert.X or fibers using Quasar/Comsat. It has lower per thread overhead than Erlang and runs code faster in general.

Both Java and Erlang will max out Linux TCP connections before running out of steam so this is kinda academic though

Re: Java 12

#200

I understand why Java has to keep on chugging along, but I feel bad for the people that have to be a part of it. It's like watching people keep coal trains going while people are moving to cars. Why? Besides being owned by Oracle, which is enough of a reason to never use Java ever again, it's also lost the niches that brought it into existence. Java no longer runs everywhere. Java on the web is dead, and you can now…

"One day Java will be like Cobol." I heard that one two decades ago about Java.

I wanted to ask him how he felt about UNIX
Post reply on HN