3 ms·
> Right now the extra compile-safety of Rust is IMO not worth giving up the other benefits of C++ I can't speak to everyone's use case, but for ours memory saf
by pcwalton 12y ago
> Right now the extra compile-safety of Rust is IMO not worth giving up the other benefits of C++
I can't speak to everyone's use case, but for ours memory safety is extremely important. C++ is not safe, and we still see tons of memory safety issues, many security-sensitive, in practice, despite using modern C++ for all new code.
Even if safety isn't as important to you, there are other reasons you might be interested in Rust: a module system, pattern matching, a standard library which offers better performance than STL for many tasks, ADTs, concepts, a package manager, etc.
- Donwangugi 12y agoWhat kind of issues do you see still with modern C++11 code?
- pcwalton 12y agoAll kinds of memory safety issues. Heap use-after-free is very common. You can go to Bugzilla and search for sec-critical to get a list of the ones Mozilla has disclosed.
- Scramblejams 12y agoI get the feeling most of these commenters who think the words "modern C++" indicate some kind of near insulation from writing security bugs are, in fact, writing security bugs. They probably think they aren't, but by definition, we are not smart enough to immediately understand the bugs we write. Otherwise we wouldn't write them. But hey, it's not like a programmer who overestimates his own skills is a new thing.
- Dewie 12y ago> concepts What are concepts in this context? It is hard to google.
- steveklabnik 12y agohttp://en.wikipedia.org/wiki/Concepts_%28C%2B%2B%29 http://en.wikipedia.org/wiki/Concepts_%28C%2B%2B%29
- Dewie 12y agoIs this something that can be used in Rust? Or is it a feature that will be implemented later?
- steveklabnik 12y agoI am not familiar enough with the details. We don't have an _exact_ analogue, though our Traits are similar-ish. I've pinged #rust, I'll see if I can get someone who knows more to answer here.
- Dewie 12y agoI was mostly curious if there is some kind of (formal) specifications that one can use (axioms).
- deleted 12y ago[deleted]