5 ms·
It's not solely about compile times though. If you consider all the debugging time Rust saves you from, I'd guess Rust even with its slower compile time, comes
by bfrog 4y ago
It's not solely about compile times though. If you consider all the debugging time Rust saves you from, I'd guess Rust even with its slower compile time, comes out ahead in terms of productivity.
That is after all what this link is telling us. One of the main points made was "speed up development"
If it were solely about compile times that wouldn't be a major reason to use Rust here.
- dralley 4y agoNot having spurious race conditions that take days if not weeks to hunt down is quite nice.
- menaerus 4y agoThat's not possible at all with the bare-metal languages. I think many people do not understand that race conditions are a direct consequence of the complexity of our CPUs, memory etc. It is not the "flawed" programming language design that allowed them to sneak in but it is because the problem isn't fundamentally solvable. Some languages try to minimize the surface area but it's not for free: there's always a trade-off attached to it. In that sense it is not anymore a bare-metal language.
- tialaramex 4y agoYou're thinking of data races, but, (safe) Rust doesn't have data races. You can't write them. In C++ if you write a data race, that's Undefined Behaviour, game over. This difference might be astonishing, but it's a fundamental design choice. The data race requires two things to coincide and in (safe) Rust they can't. You need mutation of a value which isn't synchronised with access to that value. In concurrent C or C++ it's trivial to do this by mistake, you now have a data race and so UB. But you can't write this in safe Rust.
- maccard 4y agoOnly a sith deals in absolutes, it's not solely about _anything_. I write multithreaded code every day, and I'm constantly pushing for us modernizing and cleaning up our c++ codebase. Mistakes happen, subtle bugs slip through, but probably 95% of the code I write and features I write don't benefit from the extra checks that rust provides. The 5% that _do_, that's a trade-off, and we need to decide whether it's worth it. In the long tail, yeah there's less bugs of various categories. Is that worth the cost of the rewrite and the productivity hit for 95% of what I do (as someone who would genuinely benefit from having a borrow checked), the answer right now is probably not