Things C++ 20 Deliberately Broke
Siarhei Siamashka
siarhei.siamashka at gmail.com
Thu Sep 29 02:57:33 UTC 2022
On Wednesday, 28 September 2022 at 19:43:34 UTC, German Diago
wrote:
> On Monday, 26 September 2022 at 08:32:27 UTC, Siarhei Siamashka
> wrote:
>> On Monday, 26 September 2022 at 03:24:57 UTC, norm wrote:
>
>> If Python developers decided to keep both Python2 and Python3
>> maintained forever, then it would be similar to C++ and Rust.
>
> Not at all. Python 2/3 is a split with incompatibilities.
These were not fatal incompatibilities though. Single-source
Python 2/3 compatible code used to be a thing:
* https://docs.python.org/3/howto/pyporting.html
* https://python-future.org/compatible_idioms.html
Of course having two slightly incompatible variants of the
programming language is not ideal. That's surely some extra work
for compiler/interpreter developers and also extra work for
popular libraries developers. But application developers didn't
have any urgency to waste resources on migrating their existing
Python2 code to Python3 and instead could focus on delivering
amazing features to their users.
Is the convenience of 1 compiler developer or the convenience of
1000 application developers more important for a programming
language? The answer depends on many factors. And the size of the
existing ecosystem is one of them.
> C++ is a deprecation + removal model except for very, very few
> exceptions. You can compile C++98 code in a C++20 compiler
> almost without any change.
You can surely compile a simplistic C++98 helloworld code by a
C++20 compiler with no changes at all. But Chromium developers
couldn't easily compile their C++17 code by a C++20 compiler.
That's exactly what this forum thread is all about. The key
difference is that Chromium is a huge project.
C++ language has multiple supported versions of the language
standard for a reason and this is a lifesaver for the projects
with huge codebases, which have to be maintained over the span of
many years or decades. If C++ compilers decided to drop support
for the older versions of the language standard, then this would
be similar to what Python did.
More information about the Digitalmars-d
mailing list