5 ms·
Java has been improving pretty fast and is starting to close the gap in spots where it's been seen weaker to Go etc. Fact still remains that it has excellent l
by bsan3 4y ago
Java has been improving pretty fast and is starting to close the gap in spots where it's been seen weaker to Go etc.
Fact still remains that it has excellent lib ecosystem, tooling, observability and large code bases with multiple teams are much easier managed in static languages.
At this point most of the downsides are from legacy frameworks. A modern framework + Kotlin is very productive.
- kuratkull 4y agoReally interested what you mean by Java having gaps compared to Golang. You can basically write Golang like code in Java, just leave out any useful language features and you've got it. I have used both professionaly and am not a fan of either. (I really like typed and compiled languages, so those are not my issues with them).
- bsan3 4y agoCo-routines .. that's a useful pattern Go did out of the box. Fast startup .. important for containers and auto-scaling Co-routines have been in Kotlin for a while, got added to Java (Project loom) recently. Same for startup time. Native image support in Project Leyden
- marginalia_nu 4y agoJava starts very quickly (like a second). If it doesn't, that's typically down to pulling in slow libraries. Spring Boot in particular is awful for start time, can add like 30 seconds to start time.
- kubota 4y agoCoroutines are coming soon, project loom.
- tannhaeuser 4y agoFor fast startup, look at GraalVM/native-image which compiles Java to native code and works very well. Downsides are that highly dynamic and reflection-happy Java code bases/libs won't run OOTB, that using profile-guided optimization (for achieving or surpassing HotSpot perfornance levels) requires a commercial EE license from Oracle (about 300-400 bucks per seat last I checked, not required for mere development until used in prod or at customer sites, and bundled with commercial JRE/JDK subscription since about a year), that even with EE your garbage collector choices are limited, and the somewhat overwhelming number of optimization flags to pass to native-image, not unlike earlier JVM runtime arg excesses.
- mike_hearn 4y agoAlthough note that using PGO with Go isn't really common either. Actually, JVM languages and JS are amongst the very few that use PGO regularly as setting it up and using it with AOT compiled toolchains takes more work.
- nprateem 4y agoIsn't Kotlin slow to compile though? I created a simple hello world Kotlin multiplatform website the other day and it took like 30 seconds to recompile any time I changed anything.
- bsan3 4y agoHavent used multi-platform. We use it for Android and Server, seems ok
- ryloric 4y agoCan you list a few modern frameworks? Just curious, I was using Play a few years ago but that was Scala.
- bsan3 4y agoQuarkus and Micronaut. Spring replacements almost. Backed by commercial companies and strong dev teams Super light frameworks, more http focused, Kotor and Javelin Spring itself had a major overhaul recently