Live data from Hacker News

Java 21 makes me like Java again

wscp.dev

541–550 of 777 posts

Re: Java 21 makes me like Java again

#541
post #525

Earlier quoted context omitted.

I never see Dart talked about in these contexts but just to highlight a few things. 1. Compiles to native code with a single and very reasonable sized binary on pretty much any platform. 2. Compile to WASM (coming this year) if that’s your thing. 3. Excellent concurrency support with lightweight and simple mental models 4. Variables are not nullable by default thus simplifying tedious checking in your codebase. 5. Sy…

Performance matters. Dart isn't even in the same league. And its null handling and checking is the worst. I absolutely hate it. Java over Dart any day.

What specifically about the null checking are you talking about?

I’ve never heard this criticism before and have no idea what you’re even referring to here but I am genuinely curious..

Re: Java 21 makes me like Java again

#542

The biggest problem with Java is... the walled garden, the snob society, the elitist, exclusive culture. Go isn't like that, or at least wasn't when G+ was still around. Nowadays I don't get in touch much with people, but when I create issues Go people are usually not as unfriendly as Java/JVM people.

> The biggest problem with Java is... the walled garden, the snob society, the elitist, exclusive culture.

No idea how you have managed to come to such a conclusion, or what kind of experienced you might have had. I have been part of some of the core JSR/groups, as rather independent/unaffiliated (not oracle/google/hp/ibm/twitter) - there was no gate keeping, elitism or anything alike.

I'd consider mailing lists extremely professional, respectful, even nice.

Re: Java 21 makes me like Java again

#543

The biggest feature in Java 21 is the release of Virtual Threads: https://openjdk.org/jeps/444 For some reason, this is missing from the article. If there was any feature that would sway existing Golang developers to switch to Java, it would be this. It would perhaps also convince the haters of the reactive-style concurrency patterns.

I don't think any existing Go developer is going back to Java. I worked with Java for 10 years and switched to Go and I will never go back. This is mostly because applications and libraries are so hard to reason about and understand due to inheritance, packaging, OOP, build tools ect compared to Go. Go is simple. It's easy to understand, read, and maintain. The packaging is like how you would package files on your co…

This is also the killer argument for going Python, by the way. Go is going to be much faster, of course, but you can still scale quite well with just going Python. And sometimes / most often you don't need scale.

Re: Java 21 makes me like Java again

#544
post #525

Earlier quoted context omitted.

I never see Dart talked about in these contexts but just to highlight a few things. 1. Compiles to native code with a single and very reasonable sized binary on pretty much any platform. 2. Compile to WASM (coming this year) if that’s your thing. 3. Excellent concurrency support with lightweight and simple mental models 4. Variables are not nullable by default thus simplifying tedious checking in your codebase. 5. Sy…

Performance matters. Dart isn't even in the same league. And its null handling and checking is the worst. I absolutely hate it. Java over Dart any day.

Dart has excellent null handling[0] so I am not sure if you're perhaps talking of another language? It has had this since release 3.0, if I recall, and has been out for quite a while.

https://dart.dev/null-safety

Re: Java 21 makes me like Java again

#545

The biggest problem with Java is... the walled garden, the snob society, the elitist, exclusive culture. Go isn't like that, or at least wasn't when G+ was still around. Nowadays I don't get in touch much with people, but when I create issues Go people are usually not as unfriendly as Java/JVM people.

Rudeness scales mostly with the size of the community. If you go to something like Nim you will immediately find them way more nice than Go, just from this.

Re: Java 21 makes me like Java again

#546
post #454
post #397

Earlier quoted context omitted.

Since it is a Java thread, I’m gonna mention that ecosystem-wise, the JVM is just much much bigger and of higher quality - you very often see copied JVM packages in C# with much less features, less stability, and often even being paid. With that said, it is a cool language and platform, that is indeed underhyped.

This 100x, C# and Java are also very similar programming languages. C# may be a better language, but the difference is minimal. Most C# developers claiming that C# is a better language often don't know Java. I remember one C# guy telling me that Java didn't have closures before Java 8, which was not quite true. Java developers had access to Groovy which had closures. Groovy may be another programming language, but it…

Groovy is... not Java.

Re: Java 21 makes me like Java again

#547
post #385

Earlier quoted context omitted.

You can’t decide language superiority by the number of features. While C# indeed has many cool features, I do think it has already went into C++ territory where all the different, independently cool features have very non-trivial interactions that make it very hard to reason about. Also, async-await is not a good thing — virtual threads are superior in every way in case of a managed language.

Why async/await is not a good thing? What makes green threads better? Do you know the difference, the issues async/await addresses that green threads simply do not?

This is code with async/await:

  async fn read_file(filename):
    f = await os.open(filename)
    let data = f.read()
    await f.close()
    return data
this is equivalent code with green threads:

  fn read_file(filename):
    f = os.open(filename)
    let data = f.read()
    f.close()
    return data
As you can see, async/await is pure syntactic noise, it doesn't convey any important meaning.

Re: Java 21 makes me like Java again

#548

Earlier quoted context omitted.

If you like jvm, use closure instead.

Sorry you’re down voted. Closure might not be what the author is looking for. There are a lot of languages you can use with the JVM, Closure is one of them, Groovy, Scala and Kotlin are some more. Kotlin is gaining a lot of traction, especially since it’s backed by JetBrains.

Clojure*

Re: Java 21 makes me like Java again

#549
post #195

Earlier quoted context omitted.

I don't think any existing Go developer is going back to Java. I worked with Java for 10 years and switched to Go and I will never go back. This is mostly because applications and libraries are so hard to reason about and understand due to inheritance, packaging, OOP, build tools ect compared to Go. Go is simple. It's easy to understand, read, and maintain. The packaging is like how you would package files on your co…

> This is mostly because applications and libraries are so hard to reason about and understand due to inheritance, packaging, OOP, build tools ect compared to Go. You are just at the early phase of the project. > Go is simple. It's easy to understand, read, and maintain My opinion is that Go is too simple, to the point that it hinders understanding and readability. 4 nested loops with random mutability is much worse…

> You are just at the early phase of the project.

Lately, I am seeing very few codebases getting supported more than 3 years in companies offering software products. Every 2-4 years services are getting rewritten, what's the point of having tool intended for 15 years, when services are deprecated in 4 years

Re: Java 21 makes me like Java again

#550

Earlier quoted context omitted.

I once posted an Ask HN: what are your build times. A golang developer stated their 25 million line project compiles in less than half a second. If that is really the case, I must say, this is very impressive and potentially a reason to switch from other languages.

I work on a product written in Go which is considerably smaller than 25 million lines and our compile times are... really... really long. I really don't believe that claim at all. If it's true, I would love to see how it's done because that is SOOO far away from my daily experience.

I was skeptical as well. Thanks for providing feedback. I suspect the way they were counting lines was wrong as 25M lines is a very large project in its own right.
Post reply on HN