Live data from Hacker News

Java Turns 25 – Whats Next? [pdf]

oracle.com

231–240 of 286 posts

Re: Java Turns 25 – Whats Next? [pdf]

#231
Everything Java does, C# does better. Java shouldn’t still struggle with generic arrays...but it does. Java should easily have first-class pointer support by now. C# does but Java doesn’t. Checked exceptions should have long been put to bed by now...but they haven’t.

The only reason to use Java atm is interop with another JVM language (e.g. Clojure) or to not get locked into the MS ecosystem. C# is otherwise just streets ahead at this point.

Re: Java Turns 25 – Whats Next? [pdf]

#232

Earlier quoted context omitted.

That's not always true. Most of the time when Java uses a ton of memory it's because people use the default memory settings. If you tell Java to use up to 90% of system RAM, it will. Garbage collection is expensive so it will delay until memory is depleted. This is a different GC design than V8 and Go, which use older collector designs with high overhead. They need to collect very frequently because their stop the wo…

When I hear "Java uses too much ram," lazy reclamation of the heap and other GC overhead are not the first things that come to my mind, personally. Java doesn't have a "struct". If you want to represent an array of 64-bit signed integers, Java has you covered with its primitive arrays. But if you want to represent an array of anything more interesting than that, (say, a tuple of a double and a long), you have to seri…

Because fighting the language is worth it given the benefits that come with it.

Plus many people overlook just writing a couple of native methods and be done with it.

Somehow this is how people write "Python".

Also Valhalla and Panama are around the corner.

Re: Java Turns 25 – Whats Next? [pdf]

#233

Earlier quoted context omitted.

Amusingly, Loom, which will likely appear in the Java 17 time-frame will allow you to use all that blocking code and it automatically transforms it into non-blocking code. Going to make coding high-concurrency applications a lot easier. Check out the few lines of code needed to convert Jetty from blocking to non-blocking: https://github.com/rodrigovedovato/jetty-loom/blob/master/sr...

I'm very skeptical of this conversion into loom. Jetty bounds the number of concurrent requests it serves based on the size of its thread pool (of course Jetty also uses a few of the threads to run its acceptors and selectors). The implementation provided here, replaces Jetty's fixed sized thread pool with an unbounded thread pool. This is going to lead to some terrible failure states when the service slows down.

The computational resources of a machine is finite no matter what language you use. You got to put limits somewhere.

Re: Java Turns 25 – Whats Next? [pdf]

#234
post #139

Earlier quoted context omitted.

Java is still my default language after so many years (even though through Clojure). I think Java's biggest advantage is the JVM though, if it had an ML programming language on the top without null and proper interfacing to Java packages I would never look at anything else. Just like .NET has F#.

What's your opinion of Scala?

Great question, I think it is a good alternative to Java even though it is trying to do too much. Not sure it is happening because it is trying to build on the top of Java or some other reasons. Scala is still good and productive language though!

https://www.youtube.com/watch?v=v1wrWQcqLpo&ab_channel=Java

Re: Java Turns 25 – Whats Next? [pdf]

#235
post #117

Earlier quoted context omitted.

I use typescript a lot. It's way better than JS but the type erasure problem is far worse than Java. Essentially all types are erased, so bugs where typings don't match what you expect and everything blows up are common. This isn't possible in Java because it's statically typed at runtime. JS also uses several times more memory, is slower, and has a terrible (non existing) threading model. Yes you can run multiple in…

> bugs where typings don't match what you expect and everything blows up are common > the only overhead is making sure objects were passing around match on both ends Seem like is it a big deal based on the first sentence. I've never been convinced of the single language argument. Sharing code between frontend and backend sounds good but as in practice there's little overlap... models have subtle differences, there's…

> Seem like is it a big deal based on the first sentence.

There is big difference between "this API can blow" and "it can blow everywhere".

Re: Java Turns 25 – Whats Next? [pdf]

#236

Java might be the most successful programming language. It is a solid choice among many different fields. It is used on huge infrastructure projects (Apache Foundation), governments, big tech companies such as amazon, ibm, google, apple for many large scale services. It can do web, ml, GUIs, it's still strong among academics. On top of that it offers a great programming experience with excellent IDE support and it's…

this thread does a good job in summarizing java https://twitter.com/cpurdy/status/1261139068672507905

excerpt Nothing competes with Java. Nothing. Because Java wasn't about destroying the competition; Java was about creating a reality that otherwise did not and could not exist. It was about imaging the "what could have been", and then creating that.

Re: Java Turns 25 – Whats Next? [pdf]

#237

Earlier quoted context omitted.

> That's tough to figure out. Indeed. That fact obviates this option in most cases. You have to spend time tweaking obscure, unstable knobs (the X in Xmx means Oracle is free to alter its meaning at any time) and risk either a.) serious failures in production or b.) poor results because the conservative choices necessary to avoid 'a' achieved little improvement and you wasted your time. The real world for most enterp…

The cost of setting a few command line args? They're not really obscure or unstable, just different depending on the GC you use. Turning on ZGC and setting the right options is like 4 command line flags. It's very easy, the reason it's not frequently done is that nobody reads documentation and it's not the default. Go's approach of minimal knobs leads to unfixable problems in production. Java gives more options to tu…

> Go's approach of minimal knobs leads to unfixable problems in production.

I didn't bring up Go, but since you did the thing I see is that Go -- a much younger language -- is going places Java never has, or did so only haltingly. Caddy is a case in point. Here is Go taking on nginx, haproxy, Envoy, etc.

The people that once imagined using Java for such things have retired or moved on to other battles. No one seriously ponders attempting 'systems' tasks with Java any longer; that whole space was ceded to more efficient languages. My opinion is that Java's poor efficiency -- a big part of which is its excessive memory consumption -- is the reason for this.

That's my opinion. What I know for fact is that today, when people are making design decisions about new services and their deployment, Java is a problem; it is understood that anything implemented in Java is going to sort right to the top of the list of memory pigs in the cluster, and you can only afford so many of those.

Re: Java Turns 25 – Whats Next? [pdf]

#238
post #13

Earlier quoted context omitted.

Nobody in their right mind would choose Java for anything ML-related.

Can you elaborate on why you feel that way?

I will risk that I get downvoted to hell. The data scientists in my company and pure geniuses. But. They can barely program. I wouldn’t trust them with Java, I’m sure they wouldn’t trust themselves either. Python is slow but at least it’s easy and fun. I don’t see anything else getting traction for long years.

Re: Java Turns 25 – Whats Next? [pdf]

#239

Java might be the most successful programming language. It is a solid choice among many different fields. It is used on huge infrastructure projects (Apache Foundation), governments, big tech companies such as amazon, ibm, google, apple for many large scale services. It can do web, ml, GUIs, it's still strong among academics. On top of that it offers a great programming experience with excellent IDE support and it's…

This is the nature of technology and economics though. Widely used and mature technology will almost by definition be behind the state of the art. Progress is always happening and by definition a new language cannot achieve mass adoption over night.

Java is big because it has been around a long time and was decent when it came out. Java was the Go of its generation. Nothing radically new but wrapped up in a way people liked and was familiar with in large part due to the success of C/C++ prior.

Whatever achieves mass adoption after Java will also be behind the times by the time that happens, and as geeks we will have moved on to whatever is newer and cooler.

I am pretty neutral towards Java as a language. My biggest issue is with the software culture of over-engineering and complicating things. Java guys seems very dogmatic about how to design software.

Re: Java Turns 25 – Whats Next? [pdf]

#240

Everything Java does, C# does better. Java shouldn’t still struggle with generic arrays...but it does. Java should easily have first-class pointer support by now. C# does but Java doesn’t. Checked exceptions should have long been put to bed by now...but they haven’t. The only reason to use Java atm is interop with another JVM language (e.g. Clojure) or to not get locked into the MS ecosystem. C# is otherwise just str…

People might find you a bit offensive, but I’m really curious if anyone has a counterpoint to this.
Post reply on HN