Hacker News new | ask | show | jobs
by kagakuninja 885 days ago
I just compiled our oldest, largest micro service, it was 17 seconds. This is a full recompile, which I rarely need to do, because IntelliJ has incremental compilation. If you have a giant mono-repo, then compile time becomes important.

I can only guess what these "Scala experts" were doing, there are certain language features that can slow your compile times, and libraries like Shapeless that leverage those features in amazing ways, but can kill your compile times.

Scala is a toolkit that enables amazing things, but you have to understand the trade-offs, both in terms of compile time, and understandability of the code.

>In the real world, types have traits/interfaces/expected attributes etc. and type erasure prevents the compiler to verify this when using binary dependencies, which is obviously _not_ what one wants in a statically compiled language.

Scala has ways of recovering the information, such as using context-bounds and type manifests. Scala can actually verify an amazing amount of constraints at compile time, but the more exotic tricks will increase compile time.

What you are complaining about are foot-guns that rarely happen in my 20 years experience with JVM languages (I think generics were added in Java 5, but still...)