Booleans, integer division, backwards compatibility; where is Python going?

Neil Hodgson nhodgson at bigpond.net.au
Sat Apr 6 17:20:45 EST 2002


phil hunt:.

> Indeed so. Stroustrup has been concerned not to break backwards
> compatibility with changes. This is probably one of the reasons C++
> is as popular as it is.

    The C++ version compatibility story is quite messy. If you just look at
it as an upgrade from standard C to standard C++ then it is simple, but C++
was a living language for 15 years before it was standardised. During this
period, the language was defined by diverse and often incompatible
implementations. During the standardisation process, implementations tracked
some changes to the language but not others.

   Every keyword added caused some code to break. I watched code break
because of the addition of "bool" and "typename". The change in for loop
variable scope "for (int i..." is *still* having repercussions. There is as
yet no complete implementation of the standard.

   Python is mostly defined by one implementation and so the version
compatibility issue is simpler and more visible. None of my own Python code
has broken because of Python changes between 1.5 to 2.2. This is without me
needing to worry about or code around the incompatibilities possible between
these versions. With my C++ code, which has been developed over a longer
period and is a larger body of work, I have had to code quite defensively
(for loop scope that works on both new and old, avoidance of the standard
library because of incompatibilities, avoidance of *exceptions* because of
Windows CE) and have still been bitten by the gradual progress of C++
implementations.

   C++ vendors are already talking about adding the features 'likely' in the
next standard in preference to full compliance with the current standard.
http://www.codeproject.com/interview/herbsutter3032002.asp
"But if I have my way we'll do that whole unified wish-list of C++98 and
pre-C++0x standard features in the order that best serves the community,
because that community priority is what I'm being paid to push inside the
company."

   Neil






More information about the Python-list mailing list