this post was submitted on 30 Nov 2023
-2 points (40.0% liked)

C++

1732 readers
3 users here now

The center for all discussion and news regarding C++.

Rules

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 1 year ago (1 children)

the fact that it's possible (and not even especially difficult) to misuse smart pointers badly enough to produce program crashes and undefined behavior is still a fundamental weakness of C++ as a language

I would argue it’s the natural state of C++. Crashes and UB lurk in every shadow, ready to pounce upon the unwary programmer.

It’s a powerful tool, but it’s not very forgiving.

[–] [email protected] 2 points 1 year ago

I agree that it's the natural state of C++, and my point is that this is makes C++ not a good choice when an alternative that has all the strengths of C++ and none of the weaknesses exists.