Erik Engheim
2 min readFeb 21, 2021

--

Few things are linear. Double compile times does not necessarily mean you double the amount of useful stuff done. Usually there is a case of diminishing returns.

Rust seems to have gone to extremes to squeeze tiny amounts of performance in exchange for massive increases in build times.

I don't know the current state, but for years Rust build times was significantly worse than C++. In my humble opinion, that is simply an epic failure.

People talk about the million dollar mistake of having null pointers. Well having C++ style compilation times is in my humble opinion a million dollar mistake in 2021. That will detract from adoption and hurt developer productivity far more than Rust safety will gain.

There is also an element of diminishing returns in building safety into a language. Usully this adds complexity but we keep adding safety when it saves us more time than we loose.

Looking at Rust, and reading the experiences people have with it, I am not convinved that they have made a sensible tradeoff. Of course that will be highly subjective as a lot of programming language tradeoffs are. Programmers work in different ways. For me it is not an effective way of working.

I work more effectilvey with rapid iterations, and Rust seems to have made every possible choice to make rapid iteration development a poor choice for Rust.

Incremental builds is not magic, or new. We have done incremental builds in all sorts of langauges since forever. It certainly did not save C++.

As soon as you are on a realistic and large project, you will on a regular basis make code changes which ripples through multiple files, causing a large number of files to be recompiled. That is not going to take 2 seconds.

If incremental builds was magic fairy dust that solved all problems with slow compilation, then nobody would have prioritized making fast compilers. It obviously matters.

--

--

Erik Engheim
Erik Engheim

Written by Erik Engheim

Geek dad, living in Oslo, Norway with passion for UX, Julia programming, science, teaching, reading and writing.

Responses (1)