upvote
Rust encourages a kind of generic programming that can result in generating too much code.

The compilation model is vastly, vastly, vastly better than languages like C++ and C, though, and it does compile much faster than an equivalent C++ build (doesn't count if you download precompiled binaries of your c++ dependencies)

reply
That's not a paradox, that's how it always works. Compiling to fast machine code requires more work and takes longer.

Is Python a fast language because it barely takes any time to compile the code? No obviously not.

reply
Looks like people extending rust never really focused on compile speed when designing features (from [1]):

> If you could reinvent/change any aspect of Rust, what would you do alternatively?

> A lot happened because we wanted to ship a useful thing with only so much time in the day, so some things were less deliberate than others. There’s an alternate version of Rust with significantly faster compiler times, because while we cared about compile times when designing we always prioritized other values more. We never asked ourselves how this feature or implementation impacted compiler analysis time and there are several spots where something slightly different would have much faster compiler times, which people do care about. But had we spent time on that, we would have neglected other things and not been any more successful.

[1]: https://alexalejandre.com/interviews/interview-with-steve-kl...

reply
You missed "without optimizations on".

This is important, because most often during development you want fast compilation times more than you want fast code.

reply
That still isn't a paradox. Furthermore it still makes sense: a language designed to generate the fastest code has constructs that cannot be compiled quickly, even without optimizations.

But some of it is implementation problems.

reply
There's no paradox here. You can use any benchmark you like to prove that Rust is a fast language. The work that the compiler does is irrespective of the language that rustc is written in.
reply
Yes, the benchmark is compiler compiling itself. From scratch and incrementally.
reply
Unfortunately, that isn't how any of this works.
reply