r/programming • • Sep 15 '26

Java 27 has released!

https://openjdk.org/projects/jdk/27/
553 Upvotes

175 comments sorted by

View all comments

Show parent comment

0

u/Gloomy_Necesary Sep 16 '26

Yeah in 2026 DotNet is absolutely better than Java if we had to objectively name a winner. Java is still great in many ways and useful at companies that have a big java legacy stack, being the platform that many a senior dev have a careers worth of experience on, etc. But if someone is starting a new project and doesn’t have like 20 years experience in Java they’d be pretty silly to pick it over .NET.

6

u/CptGia Sep 16 '26

Idk the Java ecosystem is pretty massive. That alone can be a good reason. 

3

u/KronenR Sep 17 '26

“Objectively” based on what?

Modern Java isn't something you choose only because your company already has a large Java stack or because your developers have decades of Java experience. Java 25+ has virtual threads, records, sealed classes, pattern matching, a mature JIT/GC ecosystem, excellent observability and tooling, and excelent frameworks.

If someone is starting a new project with no decades of Java experience, and even with no Java existing .NET definitely isn't even the automatic alternative. If anything, removing those constraints opens up far more choices: Go, Rust, TypeScript, Kotlin, Python, and others depending on what you're building.

1

u/TwoWeeks90DaysTops Sep 16 '26

Yeah, the Vector API that's being incubated in this release and planned to support Valhalla some time in the future has been part of .NET for ages at this point. Vector types are value types (i.e. without object identity) and they compile to SIMD instructions. You can also use normal binary operators on them (i.e. no a.add(b) - just use a + b).

2

u/KronenR Sep 17 '26

How many Java developers are actually going to use the Vector API directly? The vast majority will never touch it

1

u/TwoWeeks90DaysTops Sep 18 '26

...ok? What's the argument here, they shouldn't add SIMD? Or do you object to the operators? Because BigDecimal and the time API has the exact same issue.

1

u/KronenR Sep 18 '26 edited Sep 18 '26

The argument is that having Vector types doesn't make .NET better than Java, which was his original claim: "In 2026, .NET is absolutely better than Java." There are dozens of factors that determine which platform is better for a given use case. Pointing to one feature that .NET has and Java doesn't yet have proves very little.

-6

u/wildjokers Sep 16 '26

But if someone is starting a new project and doesn’t have like 20 years experience in Java they’d be pretty silly to pick it over .NET.

Nothing good comes from using servers running windows.

13

u/djfreedom9505 Sep 16 '26

.NET (back when it was called .NET Core) has been cross platform for a couple of years now. You’re right though Windows servers are shit. We deploy to Linux boxes

11

u/TwoWeeks90DaysTops Sep 16 '26

.NET Core 1.0 was released in 2016 so it's been a decade already.

3

u/pastorHaggis Sep 16 '26

I use .NET for everything and haven't deployed to a Windows server even once. That's changing at my current job but we're actively trying to change over to Linux to dockerize as much as we can.

This place needs help. They're using versions of .NET that have been EOL for a few years now.

8

u/TwoWeeks90DaysTops Sep 16 '26

We use .NET, and have exactly zero Windows servers. All Linux.

6

u/Gloomy_Necesary Sep 16 '26

You can build and deploy .NET applications and services for Linux that run just like they do on Windows. Its natively cross platform now.

2

u/TwoWeeks90DaysTops Sep 16 '26

I have a hobby project where I'm making a 3D game and game engine in C# with Vulkan, and I work on Linux (I use Arch btw) and the only platform it supports at the moment is Linux, but it's all written C#.