On Wed, May 25, 2016 at 6:51 PM, Nicholas Nethercote <n.netherc...@gmail.com > wrote: > > >> I did not read that as making *all* defects impossible, rather that it > was > >> talking about preventing defects, and one such approach is to use a > >> mechanism (Rust, smart pointers) that makes certain types of defects > >> impossible. > > > > It's not a matter of defects versus non-defects. It's a matter of > abnormal > > program > > termination versus non-termination. > > You lost me there. Can you clarify how program termination is related > to defect prevention? >
I'm not really sure this is worth trying to parse this particularly finely, but the relevant point is that smarter language primitives can have several types of impact: - Making it so that certain kinds of defects are difficult or impossible to write For instance, if you use smart pointers and never unbox them, it's difficult/ impossible to have UAF. This reduces crashes. - Making it so that certain kinds of defects still happen but they are safer. For instance, in C writing dereferencing past the end of an array is undefined behavior and may well cause something horrible, in Python you get an exception, which, if not caught, causes program termination. It's safer in the sense that it's unlikely to cause a security vulnerability, but it's still a crash. -Ekr _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform