Fedora ponders the Python 2 end game
Fedora ponders the Python 2 end game
Posted Aug 3, 2017 0:05 UTC (Thu) by khim (subscriber, #9252)In reply to: Fedora ponders the Python 2 end game by anselm
Parent article: Fedora ponders the Python 2 end game
For example, IIRC there are all sorts of subtle differences between C and C++, to a point where a valid C program doesn't necessarily work the same way in C++That's why even today there are C parser in gcc and clang and you could link together modules written in C and C++.
By contrast, it is possible to write code that works in both Python 2.7 and 3.xBy contrast? "Normal" C code is also a C++ code, all the changes and possible incompatibilties are explicitly listed in C++ standard (annex C) and in general the "natural" case is when code written for old version works in a new version - only some odd corner-cases are broken!
Compare to python, where "normal" python 3 code is completely incompatible with python 2 and where compatibility features which allowed one to write 2/3 code only arrived later, when developers "suddenly" discovered that people are just not in hurry to spend countless hours doing pointless work for no good reason.
Python2 to Python3 transition may not be the worst type transition (PHP6 and Perl6 transition attempts were even worse), but it's certainly the worst one which haven't killed the language (PHP6 died and Perl6 haven't - but in both cases original implementation survived and are in wide use).
the Python developers have made changes in recent versions of Python 3.x that improve compatibility even moreSure, but all that work was an obvious afterthought whiles it's certainly the most important part of any such transition.
Posted Aug 3, 2017 9:31 UTC (Thu)
by mpr22 (subscriber, #60784)
[Link]
Posted Aug 3, 2017 13:25 UTC (Thu)
by niner (subscriber, #26151)
[Link]
"Normal" C code is emphatically not C++ code, because normal C code often uses malloc() and seldom explicitly casts the return value to the desired pointer type because C's implicit conversion rules say that void * is implicitly castable to any other pointer type and programmers are often lazy. C++ discarded that implicit conversion.
Fedora ponders the Python 2 end game
Fedora ponders the Python 2 end game
