3 ms·
The default [] for vector doesn't do bound checking, so I don't feel it helps they much. One thing in practice I like about Rust over C++ is the "easy option"
by CJefferson 5y ago
The default [] for vector doesn't do bound checking, so I don't feel it helps they much.
One thing in practice I like about Rust over C++ is the "easy option" is safe, and you have to do things like write 'unsafe' to opt out of safety.
Certainly when teaching C++ I wish the defaults were safer. I can teach ".at", but it isn't what you see in most code / tutorials.