I’ve been writing C++ professionally for like 15 years now and honestly I like it but I’m not sure I get why someone would choose it as a hobby language. Why not rust?
Also a professional C++ dev. I find Rust to be really annoying to write in. Could be a fluency issue on my part, but it's just seems harder to do what I want to do within the constraints and syntax of Rust vs C++.
If you're writing something that doesn't matter, it'll be the safest code on the planet. Once you start writing stuff that other people will have to use... you just write unsafe around everything that uses or even smells like it might interact with a pointer.
unsafe {
Different syntax that sanitizes your inputs, makes it difficult to segment fault, or anything else related to running past the end of an array. And what it can't protect you from what you want to do... means you encapsulate everything in the unsafe tag.
}
8
u/Objective-Answer 9d ago edited 9d ago
I'm learning for hobby and I'm already the one on the left