4 ms·
But that was my point, I don't necessarily want to do more. In general I want results faster, and am not willing to trade build speed for more safety checks unc
by jstimpfle 4y ago
But that was my point, I don't necessarily want to do more. In general I want results faster, and am not willing to trade build speed for more safety checks unconditionally.
Having some additional features and checkers is nice, and can even be a life saver, but having to pay a high cost each time I hit compile is not acceptable.
- PoignardAzur 4y agoTo expand on my other answer, part of the problem is that Rust's compile time complexity is in large part spent on knowing what code to execute, not just whether the code is valid. So the compiler will spend some time inferring the types of different variables and what traits those types implement, which is necessary to know which trait methods get called, etc. Dynamically-typed languages get to skip all this and say "my type is either a number or an object, because everything in the universe is either a number or an object", and methods are selected through dynamic dispatch (usually by storing a ton of function pointers everywhere). Rust can't just do dynamic typing and skip the compile-time logic, though you can get close by using lots of dyn traits.