3 ms·
> As a point of reference, compiling ~200 Scala classes at a time would take ~2.5 minutes on average. Odd... I just did a full compile of a Scala project I wor
by AdieuToLogic 11y ago
> As a point of reference, compiling ~200 Scala classes at a time would take ~2.5 minutes on average.
Odd... I just did a full compile of a Scala project I work on which has:
- 259 source files
- Contains dozens of macros[1]
- Results in 2097 classes (includes companion objects and anonymous types)
And it took 75 seconds on my laptop. As I mentioned in another reply, doing a full recompile is rarely needed but was done now to provide quantified metrics.
1 - http://docs.scala-lang.org/overviews/macros/overview.html http://docs.scala-lang.org/overviews/macros/overview.html
- leothekim 11y agoIn Java, I compile around 250 classes in about 6 seconds on my laptop. It results in around 250 class files being generated because no filea for anonymous inner classes are created from the lambdas in the code. I don't need a full recompile either. An incremental compile in Java is measured in milliseconds. IntelliJ is usable to its fullest instead of being a fancy editor that just autocompletes and jumps to symbol definitions. You may not be using all of scala's language features. I'm using java's features to the fullest. I compile in 6 seconds. You compile in 75 seconds. You may still prefer that trade off. After working with thousands of scala files (you have 259 source files? That's cute! I wish I could pinch your cheeks!) where a 75 second compile sounds like a fail-fast error, I think I will live happier with what Java 8 has, limited and warted though it may be.
- AdieuToLogic 11y agoYou have no idea my background, how I use Scala, and assume that the small project I reference is the only project I _could_ reference. It was chosen due to being near the size of the situation you describe as "compiling ~200 Scala classes at a time would take ~2.5 minutes." Being a condescending asshole doesn't help you communicate with others. Frankly, it strengthens my opinion that you don't know how to organize a medium-sized project, since being able to do so obviates requiring to compile 2000+ files for each build _in any language_.
- leothekim 11y agoIn Java, I compile around 250 classes in about 6 seconds on my laptop. It results in around 250 class files being generated because no filea for anonymous inner classes are created from the lambdas in the code. I don't need a full recompile either. An incremental compile in Java is measured in milliseconds. IntelliJ is usable to its fullest instead of being a fancy editor that just autocompletes and jumps to symbol definitions. You may not be using all of scala's language features. I'm using java's features to the fullest. I compile in 6 seconds. You compile in 75 seconds. You may still prefer that trade off. After working with thousands of scala files (you have 259 source files? That's cute! I wish I could pinch your cheeks!) where a 75 second compile sounds like a fail-fast error, I think I will live happier with what Java 8 has, limited and warted though it may be.