2 ms·
> 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
by masklinn 8y ago
> 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.
- pjmlp 8y agoSure 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.
- masklinn 8y ago> 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.
- pjmlp 8y agoSome people prefer a Python 2/3 community schism, others prefer that tools actually get adopted in spite of a few transition flaws.