Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There could be a --i-am-a-stuntman-and-i-spit-in-the-face-of-danger flag, that would disable some checks for compilation to be fast enough. It could be used when building known good packages or during design iteration. It would be an escape hatch.

Of course the problem is: would people just add the flag to their configuration and never disable it? I think they would not. Because people mostly use defaults. That's why instead of -Wall -Wextra -pedantic with possible -Wereor for development, most places I worked in ignore most default warnings and just occasionally run some kind of static analysis. Even though many times the analysis often results with things that would be detected with additional warning flags.

And yeah I hate it and I wish that warnings would mostly be treated as errors or silenced when applicable. Then there are always separate efforts to "clean the warnings". But afterwards new code just introduces new warnings, because people are trained to ignore them.

I assume that Rust developers don't want my scenario to happen at all, but I feel that with defaults reversed it wouldn't.

But maybe it's to great a risk? Of course as always it's a game of trade offs.



IIUC, for typical programs, most of Rust compilation time is spent waiting for LLVM to spit out results.

There's a plan to use https://github.com/CraneStation/cranelift for debug builds instead of LLVM, which would make them faster at the cost of supporting fewer targets, and producing worse code.


You're assuming those checks are a real bottleneck for compile times. Rust only does borrow checking at the function level, so it's easy to parallelize and not all that slow. Most of the compile time is spent on code gen, if I recall correctly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: