5 ms·
It is, but if all you want is a JVM, Java is still probably the worse choice over Scala or Kotlin
by hannasanarion 6y ago
It is, but if all you want is a JVM, Java is still probably the worse choice over Scala or Kotlin
- dunefox 6y agoYeah, absolutely. It's objectively worse than most languages.
- bitcharmer 6y agoThe exact opposite is true. Scala's and Kotlin's syntactic sugar comes with tonnes of overhead and additional allocation. Java is pretty raw compared to them and allows you to stay closer to the C-spirit and thus retain more control over the side effects of the code you write.
- smabie 6y agoYou can write Scala to pretty much just look and run like old school Java if you want. I haven't seen any benchmarks, but I doubt a Scala app written idiomatic style would be any slower than the Java version written in idiomatic style. Also, what is this C spirit we are trying to stay close to? I'm certainly not interested in any "C spirit"
- bitcharmer 6y agoThe C spirit I'm referring to is the raw, verbose and low-level-ish nature of writing code in C. For high-performance/low-latency Java apps it is absolutely crucial to have this level of control over code and resulting instructions emitted by the compiler. On the other hand - if you don't care about it and want to focus on domain-level stuff you absolutely can. This is what I find the most appealing about Java.