On Fri, Mar 28, 2014 at 8:14 AM, Daniel Micay <danielmi...@gmail.com> wrote: > Lifetimes serve no purpose other than to prevent the programmer from > doing stuff, and are *entirely* stripped out before code generation. Do > you want to override/disable borrow checking and freezing too? > > There's also the exhaustiveness check in match and let expressions. > There's the imperfect flow control analysis used to guarantee that > there's a return before the end of a function. There's a dynamic check > on integer division for a zero divisor, and INT_MIN / -1 needs to be > checked for too with signed integer division. There's the dynamic borrow > checking performed on RefCell, which has to be used if you want > mutability combined with shared ownership of a non-plain old data type > in Rc<T>.
This is unfair. You're mixing up static checks such as exhaustiveness, freezing, and lifetimes, which have no performance impact (or at least, the performance impact caused by their limitations would be mitigated only by fundamentally rearchitecting the user code, not flipping a check off), with dynamic checks such as array bounds, RefCell, and division, which have an impact and can be flipped off. (I'm not disagreeing with any other arguments, although I do think it would be interesting to try it and get actual numbers on its effect on rustc and Servo's performance.) _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev