(and FWIW I'd say that 2000+ classes - that's what, 600KLOC? - implies a project that should be split up with clear boundaries (i.e. separate release cycles, documented public APIs between them), if only for developer comprehensibility. How big is a Java project that provides the same amount of functionality, and how long does it take to compile? Crikey, 2000 classes...)
I can't say I understand that strategy completely but I have also never worked on machinery the size and complexity of Facebook or Twitter.
LOC isn't what should count though - there are cases where 1 line of Scala offers functionality that would take 10 or more lines of Java to implement.
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
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.
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_.
Not often at all.
> I am talking regular development cycle, ie make a change, save/compile, check if it works etc.
sbt[1] supports incremental compilation and projects such as Play[2] leverage this to support "on-the-fly" recompilation while the container remains running.
1 - http://www.scala-sbt.org/0.13/docs/Understanding-Recompilati...
How much time did it take to compile, and how much time does the same 2000+ classes take to compile in Java?
I used Scala for 4+ years at a company that spent a non-trivial amount of time and resources speeding up its Scala builds (way more than 2000+ classes), sometimes doing sadly controversial things[1] to achieve that speedup. It was a real quality-of-life issue, and one of the reasons that compelled me to leave.
I'm using Java 8 now, and yes it has its warts and is nowhere near Scala wrt functional goodness, but I'm glad to be compiling and iterating a lot more quickly with the ability to use even a subset of the Scala stuff I missed.
[1] https://groups.google.com/d/msg/pants-devel/mcdllXQsYNg/96ZG...