logoalt Hacker News

mitxela • today at 5:31 PM • 1 reply • view on HN

I define undefined behaviour as a bug in C++. Now C++ is memory-safe!

btw, it's not actually that hard to write correct code in C++, easier than in C because you have all the container types. The problem is that nothing will tell you when you write incorrect code - there's no guarantee.


Replies

simonask • today at 6:59 PM

UB is part of the C++ standard. Surely you can understand the difference between the C++ standard and bugs in compilers implementing the C++ standard. This is that.