Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> It is true, C++ has several warts some of them caused by the copy-paste compatibility with C.

I mean that's a bit of a cop-out given C++ has more non-C warts and UBs than it has C warts and UBs at this point. It's not just "copy-paste compatibility with C" which made std::unique_ptr or std::optional deref and UB.



Sure it is, because they need to be compatible with C pointer semantics.

The large majority of C++ UB comes from compatibility with ISO C UB 200+ documented cases.

And ISO C++ working group is trying to reduce the amount of UB in ISO C++, which is exactly the opposite of ISO C 2X ongoing proposals.


> Sure it is, because they need to be compatible with C pointer semantics.

They don't need to be compatible with unsafe / UB C pointer semantics, allowing them to both contain garbage and be deref'able were explicit decisions the C++ committees did not have to make but chose to.


Some people prefer a Python 2/3 community schism, others prefer that tools actually get adopted in spite of a few transition flaws.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: