this post was submitted on 02 Mar 2025
36 points (97.4% liked)
C++
1920 readers
2 users here now
The center for all discussion and news regarding C++.
Rules
- Respect instance rules.
- Don't be a jerk.
- Please keep all posts related to C++.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Exactly... I've never gotten the whole "C++ is so unsafe" thing. If you're having trouble with manual memory management in modern C++, it's likely because you're doing something wrong.
There are use-cases for it, but if you're working with something so performance critical that you can't afford an
std::array
orunique_ptr
, you're probably better off just writing straight C instead (except then you don't even have references).Modern C++ has a shitload of guardrails if you care to use them, but also lets you say "fuck it, this
void*
points to a double, trust me" if you want to.