Remix.run Logo
UltraSane 9 hours ago

I'm moving from Python to Java because of how much easier it is to actually use all CPU cores in Java and strict typing prevents so many bugs and it is much faster. I don't think it is actually that much more complicated than Python in 2025.

martinald 9 hours ago | parent | next [-]

Agreed. It's sort of crazy how little people understand about multicore software design given nearly everyone is using machines with >8 CPU cores these days (even a cheap android phone tends to have 8 cpu cores these days).

In python and node it is _so_ painful to use multiple cores, whereas in .net you have parallel for loops and Task.WhenAll for over a decade. Java is similar in this sense that you don't have to do anything to use multiple cores and can just run multiple tasks without having to worry about passing state etc between 'workers'.

This actually becomes a really big problem for web performance, something I'm deeply passionate about. Not everything is just IO driven holdups, sometimes you do need to use a fair bit of CPU to solve a problem, and when you can't do it in parallel easily it ends up causing a lot of UX issues.

fijiaarone 7 hours ago | parent | next [-]

On most cloud deployments, you get one shared “virtual” core — whatever that means.

UltraSane 7 hours ago | parent [-]

No you get how ever many you choose and are willing to pay for. 1vCPU is not good for very much.

UltraSane 7 hours ago | parent | prev [-]

Even Guido van Rossum admits that if he had known how common high core count CPUs would become he wouldn't have chosen to use the GIL

mlhpdx 8 hours ago | parent | prev | next [-]

That’s one reason I’ve preferred .Net. Put ahead of time compilation on top and it is glorious.

zem 9 hours ago | parent | prev [-]

out of curiosity, why not kotlin? I had the impression it was the jvm language to reach for by default these days.

a57721 6 hours ago | parent | next [-]

I am doing backend in Kotlin, but I must admit that Java has been catching up quickly, and it seems like Kotlin has been shifting its focus to Kotlin Multiplatform. Modern Java is a good, pleasant language and a safer bet.

Gradle with Kotlin DSL is nice, what's annoying is Gradle's constant API reshuffling for the sake of it that breaks plugins. Some plugins also introduce pointless breaking changes just to have a fancier DSL.

The IDE support is not an issue in practice, in my opinion, because IDEA is the best IDE for both Java and Kotlin. The official Kotlin LSP was released 6 months ago, but I haven't tried it.

UltraSane 7 hours ago | parent | prev | next [-]

I'm dabbling and like it but there is just SO MUCH JAVA code. There are 1000 Java examples for every 1 Kotlin. Maybe LLMs make this less of an issue now though.

lock1 8 hours ago | parent | prev [-]

Has too much sugar, and without JetBrains IDE you're stuck with a plain text editor. Not sure if it's generalizable to normal Kotlin or not, but learning Gradle Kotlin DSL made me want to rip my hair out when trying to understand what happens under the hood.