Live data from Hacker News

Java 12

jdk.java.net

161–170 of 478 posts

Re: Java 12

#161

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…

So far I did not find anything comparable to replace Java for website server language. Go is a terrible extremely verbose language without vital features. JavaScript on Node is limited by single-thread and JavaScript itself is a terrible language (along with other dynamic languages like PHP, Python, Perl, Ruby). Rust is awesome, but I don't think that it'll be ever usable for mediocre developers, therefore it can't b…

> JavaScript itself is a terrible language (along with other dynamic languages like PHP, Python, Perl, Ruby)

You know, I used to think that languages had a single axis of Good. And each language sat at a certain point in that one dimension.

After several years each of experience writing large web applications using C++, Java, C#, JS, Python, Ruby and Go, that mental model of languages being good, bad or terrible seems incredibly naive now.

But overall, if someone were to ask me to write a web app today, I would probably use Python server-side and break it down into microservices. Client-side, probably just pure js + HTML5 APIs.

Why? Because I don't have the time to argue about languages being better or worse. I am too busy writing code that does useful things.

In a high-skill rockstar team, dev time is by far the most expensive resource. In a startup environment, using your dev time wisely is the difference between a unicorn and a failed business. Nobody gives a fuck if your route handler executes in 1ms or 20ms. I'll gladly pay the 20x hosting costs if that will get my feature out to customers a week earlier.

Re: Java 12

#162

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…

> it's also lost the niches that brought it into existence Applets, JavaBeans, and CORBA. What a loss. > Besides being owned by Oracle, which is enough of a reason to never use Java ever again, That stopped being an issue years ago. OpenJDK is a thing, you know? > Java on the web is dead, I don't think you have any idea about the hundreds of millions of lines of Java that power the web as you know it today. The rest…

I liked CORBA! I'll take it over whatever lackadaisical JSON silliness we have today.

Re: Java 12

#163

Earlier quoted context omitted.

If you know the claim is bogus then you must have done the work to prove that. Show that work to them and stop being so unpleasant to me.

I thought we already established this. It was the GC documentation itself [1] that admitted the summary was bogus. Specifically: > Usual latency induced: >100 ms, but can be more, especially on a very occupied heap [1] https://wiki.openjdk.java.net/display/shenandoah/Main#Main-F...

In a failure mode! When you have deployed it outside its system requirements!

Re: Java 12

#164

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…

So far I did not find anything comparable to replace Java for website server language. Go is a terrible extremely verbose language without vital features. JavaScript on Node is limited by single-thread and JavaScript itself is a terrible language (along with other dynamic languages like PHP, Python, Perl, Ruby). Rust is awesome, but I don't think that it'll be ever usable for mediocre developers, therefore it can't b…

Bit of a Go fan here so just wondered if you'd qualify what you mean by: > without vital features

Re: Java 12

#165
post #26

Meanwhile, most enterprise apps still seem to only work with JRE 8. And those which I know of have elected to replace Java rather than upgrade.

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

Re: Java 12

#166
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.

This has already happened in a way. Unity uses a ton of C# for scripting. While C# is somewhat nicer to work with, this low pause GC makes java a compelling option for moving much more logic into the VM language

Keep in mind that C# has support for non-primitive value types (structs) which means you can avoid garbage collection entirely if you're careful (not all that difficult in my experience). Additionally, Unity has just introduced a specialized low-latency garbage collector in their beta build. Overall, from where I'm standing, Java doesn't look very appealing for game development.

Re: Java 12

#167

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…

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…

> 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 order to scale horizontally is important (Golang), or speed of development is important (PHP, Python), or correctness is important (Haskell, Rust). Java is rarely the winner in any area in favor of being well rounded, but as we should be using tools that meet at least the broad requirements it is always possible to make a better choice than Java.

> I’ve seen apps run for years straight.

This is why Java is dated. I am an Erlang developer, which is known for being hot reloadable and running forever. It turns out this model is actually juxitposed to Kubernetes and severless, which both presuppose letting processed crash at the host level and starting and stopping quickly. This also gets into the tooling argument because profiling in Java would rather the VM be long lived.

> The tooling.

I too have an operating system with great tooling, it’s called Linux. My knowledge of tooling is more broadly applicable, I can introspect any binary and attach probes to the kernel with bpf. Profiling for a VM is table stakes because you’re on your own. Not only do you have to figure out what’s going on in the JVM you also need to duplicate your effort to figure out how the JVM is running on the host.

> Java OO is fine.

OO in general is not fine.

Re: Java 12

#168
post #32

Earlier quoted context omitted.

Serious question: Isn't Java still one of the default languages if you are choosing a "safe" language to build and maintain a large piece of software? Considering how long it's been around and how many libraries exist for it now, i've generally viewed it as a language that's: - fast enough for most things without a lot of pitfalls/gotchas - easy enough to read for most developers - easy enough for most developers to…

All of those points are also true for C#, which imho fixes a lot of Java's problems and is a much nicer language. With .Net Core maturing you even get the "runs everywhere" factor (at least everywhere you care about, i.e. Win+Linux+Mac), and Microsoft is a much better vendor than Oracle.

I gotta ask what in particular "problems" C# solves over Java, and I'm not talking about J2SE 1.4. Having dipped into C#, it feels like the designers resented OOP and reusable code. C# is not the new kid on the block and is almost 20 years old now.

Re: Java 12

#169

Earlier quoted context omitted.

> which merely shifts the blame for the pause from the GC onto the application? There is no shift here, this has always been how things work. GCs are not a magic wand that allow you to do anything with reckless disregard towards efficiency with zero drawbacks (neither do malloc/free). Improved GC algorithms strive to cover more and more real-world workloads. Sometimes they fall short. Sometimes the developer did inef…

Well that's exactly the point too. GC's aren't magic wands, and people just need to be honest about the inherent limitations of whatever they build or use. You can't claim X is independent of Y when it very clearly cannot be, no matter how much you want that to be the case. That's all I'm saying.

The length of individual pauses is independent of your heap size. It still depends on your root set size (which includes thread stacks). Other factors (CPU cycles consumed, throughput) depend on your heap size and allocation rates.

Those performance goals are only valid when given enough spare resources (heap > live set size, cpu cores). If there are insufficient resources then the VM may eventually enter those "failure modes" to keep the application running, albeit at reduced performance, instead of crashing. I think there are flags to make it just exit if that's preferable over latency spikes.

Ultimately you cannot ask it to do the impossible, this much should be obvious.

Re: Java 12

#170
post #96

Earlier quoted context omitted.

"Presumably they meant Java in the client" Android?

They are talking about his https://en.wikipedia.org/wiki/Java_applet Which were absolutely everywhere at the turn of century.

So, yeah...if you are only thinking about web applets, which died over 20 years ago, and ignoring Android, which runs on most of the world's phones, I see why you might think "Java is dead."
Post reply on HN