Re:A Few More Reasons Rust Compiles Slowly
by Elinvynia on Monday June 29, 2020 @03:56PM
(#23681905)
With Rust you get safety at compile time while avoiding memory safety issues at runtime. The compile times are objectively longer compared to most other languages. But whether this trade-off is worth it for you depends a lot on your company's CI pipeline and the skill of the developers.
[ Parent
| on HN ]
I'm not sure safety has anything to do with long compile times, can you enlighten?
There’s a lot happening at compile time that less safe languages don’t do. Type checking and type erasure, etc
As the article explains, this all is a relatively minor contribution to compile times.
Ada/SPARK does it.
Re:A Few More Reasons Rust Compiles Slowly
by verdagon on Tuesday June 30, 2020 @03:55AM
(#23687762)
IIRC, languages like Java and Go compile quite fast, and they are even safer than Rust...
I feel like the long compilation times is going to be a show stopper for smaller teams/companies where you can't afford the loss in productivity.
Anecdotally I can tell you it does not amount to a loss in productivity. Cargo caches built deps so the cost is really only paid once in a while and the advantages of rusts type system are a boon to productivity.
If productivity is important, you really can't afford memory corruption bugs. Those can easily take weeks to hunt down.
Re:A Few More Reasons Rust Compiles Slowly
by pdimitar on Tuesday June 30, 2020 @09:39AM
(#23689851)
It can be slightly annoying -- compared to f.ex. OCaml with its lightning-fast compiler -- but in practice incremental recompilation is much faster than a compilation from scratch so it rarely irks me that badly.