Scala is an amazing language that boosts developer productivity and truly brings back the joy of programming! However, as teams and projects scale up there are a number of issues that shadow the joy from the early days. In some ways, Scala is not ready for mainstream. We want to change that!
Tools, tools, tools
A brilliant language is not enough: developers rely on a myriad of tools in their work, and every little barrier between the “stuff of the mind” and the “stuff that runs” adds up and leads to frustration, procrastination, bugs or plain waste of time. For Scala to deliver on its promise, we need better tools.
Along with Java a new breed of tools came along, and things like “instantaneous” compilation, powerful IDEs and debuggers, code coverage or build tools became the norm. Scala has the potential to boost developer productivity in similar ways to how Java did back in the day, but only if the tools we use are as sharp as what they replace. Sadly, we are not there yet.
First step: compilation time
Scala compilation times are excessive. Enterprises with code bases in the millions of lines of code frequently experience compilation times of tens of minutes. Moreover, compilation times are unpredictable, depending on a combination of language features, external libraries and type annotations. A single line change may increase compilation times ten fold. This leads to loss of productivity, frustration and ad-hoc solutions such as avoiding language features at code review. Compilation times, manual code style reviews and lack of transparency of the build process are the leading causes of frustration and loss of productivity in Scala developers.
As our first mission we set out to build a faster Scala compiler.
Meet Hydra: a parallel Scala compiler
We all know that the free lunch is over: processors don’t get faster, and applications that can’t take advantage of more than one processor won’t see any “free” speedup by upgrading to the newest machine. Hydra parallelizes the Scala compiler and uses all available cores, achieving up to 3.2x speedups on regular laptops, and way more than that on server-grade hardware. We do that by building on top of the Scala compiler, so we support:
- All Scala versions above 2.11.8 work out-of-the-box
- Compiler plugins just work
- Macros (including macro paradise or scala-mate)
As we move forward we are going to build on top of this foundation to achieve:
- Insights in your compilation times, breaking down how time is spent and signalling pathological cases
- Distribute and cache compilation results across team members
Hydra takes less than 5 minutes to install and it meets you right where you are. Get started now!