4 ms·
A common approach to programming bugs is to try and educate programmers to not make particular mistakes. A more effective approach is to redesign the language s
by Animats 12y ago
A common approach to programming bugs is to try and educate programmers to not make particular mistakes. A more effective approach is to redesign the language so those mistakes are impossible.
Exactly. That's why I'm bothered by Rust being almost protected against memory errors, and Go being almost protected against race conditions. Even if you give up some performance, it's a big win to eliminate entire classes of errors.
(Still, both are way ahead of C/C++ in this area. So far, I don't think there's been a CERT advisory for a Go program. Rust is too new to be attacked yet.)
It has been (7) days since the last CERT security advisory for a buffer overflow in a C/C++ program.
- lucian1900 12y agoRust fully protects against memory errors (and data races, for that matter). Having "unsafe" is necessary for making useful software and, in fact, it is also present in most other safe languages: Python, Java, Haskell, etc.
- codygman 12y agoUnsafe is useful and necessary for many things, but most of the time it is easier to avoid it. However it is disingenuous to claim unsafe is necessary for making any useful software.
- sillysaurus3 12y agoHowso? Without unsafe, you can't do what you need to do. That's the definition of "necessary for making useful software."
- codygman 12y agoCan you define "what you need to do"? For instance, if I want to download/parse an html webpage or make some sort of web crawler or bot, why would I need unsafe?