3 ms·
any valuable starting tutorial for c/c++ programmers ?
by jokoon 12y ago
any valuable starting tutorial for c/c++ programmers ?
- Animats 12y agohttps://github.com/rust-lang/rust/wiki/Rust-for-CXX-programmers https://github.com/rust-lang/rust/wiki/Rust-for-CXX-programm... There's also http://featherweightmusings.blogspot.com/2014/04/rust-for-c-programmers-part-1-hello.html http://featherweightmusings.blogspot.com/2014/04/rust-for-c-... which is longer, but not as useful. Rust has roughly the feature set and memory model of C++. The difference is that in Rust, the safety issues C++ sweeps under the rug are addressed. As I point out occasionally, the three big problems in C/C++ are "who owns it", "how big it it", and "who locks it". C fails to deal with any of those issues. C++ sometimes deals with "how big is it". Rust deals with all of them. In Rust you have to deal with most of the memory management headaches you have in C++, but they're detected at compile time, not after the product ships.
- tonfa 12y agoHow likely is it that a future version of c++ would tackle this issues?
- steveklabnik 12y agoIt's impossible to address 100% in C++ without breaking backwards compatibility. "Modern C++" is significantly more safe, but still isn't completely safe.
- Animats 12y agoVery unlikely. I tried, a decade ago, to get the C++ standards committee interested in safety issues. They were fixated on new template features. I once suggested, around 2002, when there was much public worry about attacks, that failure to address the safety issues in C++ constituted material support of terrorism. That really upset some people on the C++ committee. In retrospect...