News for hackers. Stuff that matters.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by izgzhen on Thursday April 15, 2021 @01:34AM (#26816490)
Even for fully statically typed languages like C++, it is very common that some old code can’t compile with latest compiler. Shrugs.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by IshKebab on Thursday April 15, 2021 @02:26AM (#26816761)
No it isn't. C++ has extremely good backwards compatibility.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by volta83 on Thursday April 15, 2021 @04:00AM (#26817443)
I disagree. C++ often removes language features, standard library features (std::random_shuffle), etc. Also object files compiled with different standard versions often are ABI incompatible with each other, which means you can't just pick new C++ for new code, but its rather all or nothing.

You can argue that when it removes features it provides a replacement (sometimes), but that does not change the fact that if you have any reasonably large project (>1 million LOC), every standard upgrade will break your app.

One of the main reasons we write all new code in Rust and are migrating the C++ code base step by step to Rust is because Rust offers infinitely better backward compatiblity guarantees than C++.

Rust never ever breaks your code, and you can opt-in to newer Rust editions for new code only, and these are ABI compatible with Rust code written using older editions.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by nyanpasu64 on Thursday April 15, 2021 @03:58AM (#26817424)
Even aside from deliberate backwards-compatibility breaks in the standard, compilers sometimes break compatibility. Both MSVC and GCC 11 have changed their header file transitive includes within the past few years, causing projects (like doctest and Qt5) to stop compiling because they forgot to include headers, which built fine in the past but not anymore. IDK if it's "very common", but it's definitely happening in the wild.

MSVC: https://github.com/onqtam/doctest/issues/183

GCC:

- https://invent.kde.org/qt/qt/qtbase/-/commit/8252ef5fc6d0430...

- https://invent.kde.org/qt/qt/qtbase/-/commit/cb2da673f53815a...