5 ms·
>- The programs are very verbose for the functionality they provide. That's true for 2005, not 2021, with var, type inference, closures, streams, and other suc
by coldtea 6y ago
>- The programs are very verbose for the functionality they provide.
That's true for 2005, not 2021, with var, type inference, closures, streams, and other such features. And since forever getters/setters are auto-generated by the IDE (including Emaca and Vim) and can just be ignored, and Java today has Records which don't need them.
>- If you do want to use Java ecosystem, there is Scala.
Now you have exponential problems. Scala has less support, slower builds, and features Scala-devs are eager to abuse to make the code unreadable.
>- Finally, if you have to run medium to large java programs, you need to constantly tune the JVM.
No, you really don't.
- twic 6y ago> No, you really don't. Production algorithmic trading app, 100k LOC, 8 GB heap, 258 threads, right now only using 105% CPU; Java 11, and this is the complete extent of JVM tuning we have done: -Xmx8g -XX:+ExplicitGCInvokesConcurrent Back in the Java 1.x days, you often did need to do careful JVM tuning. But for the past few years, you haven't. The ergonomics are enough for a very broad range of workloads.
- coldtea 6y agoYep. And to add to what you wrote for those that are not familiar with those types of apps: "Production algorithmic trading apps" is among the worst case regarding to peformances / pauses / and tuning needs.
- blandflakes 6y agoYeah G1GC has been a marvel for us as well (high traffic streaming video)
- esarbe 6y ago> Now you have exponential problems. Scala has less support, slower builds, and features Scala-devs are eager to abuse to make the code unreadable. Unfortunately, the Scala compiler is quite a bit slower than javac. In practice this doesn't hurt quite so much anymore; incremental builds make working even with large code bases quite snappy. Full-rebuild; get a coffee. The build tools for Scala have _massively_ improved in the last 5 years. IntelliJ support is superb and VS Code with metals is shaping up very nicely. I agree that since Scala is a unopinionated language, you need to be strict in what you allow your devs to do. Code reviews and agreements on levels of abstraction and concepts used is mandatory. I've worked with multiple teams in the last 8 years and this discipline is important when working with Scala. Doing so will give you the opportunity to write clean, maintainable and readable code in a very powerful language.
- blandflakes 6y agoThe compile time is horrible, but improving, agreed. SBT is a serious travesty and I don't blame anybody who skips the entire language to avoid it.
- KptMarchewa 6y agoDoes scala compiler still does 25 or something like that passes? It won't ever be fast when doing this.
- esarbe 6y agoIt's still too many passes. https://scala-ci.typesafe.com/grafana/dashboard/db/scala-benchmark?orgId=1 https://scala-ci.typesafe.com/grafana/dashboard/db/scala-ben... The Scala 3 compiler has much fewer passes though.