3 ms·
The reality is that Python2 and Python3 are really two different languages, not unlike C and C++. This is being recognized more as time passes. Should Python2
by downerending 7y ago
The reality is that Python2 and Python3 are really two different languages, not unlike C and C++. This is being recognized more as time passes.
Should Python2 be consigned to history? Should C have been? I'm not so sure now. Python3 has a lot more to know, but not necessarily a lot more that's useful for what I do.
- cesarb 7y agoIt's the paradox of the heap. Should Python 2.6 be considered a different language than Python 2.7? What about Python 1.6 and Python 2.0? Perl 5 and Perl 6? What's the exact amount of changes necessary to switch between "new version of the same language" and "new language"? You might thing that the answer is "breaking changes", but every change breaks someone's workflow (https://xkcd.com/1172/ https://xkcd.com/1172/), and even a minor release like Python 2.7.9 had some breaking changes (and yet it's widely considered the same language as Python 2.7.8).
- downerending 7y agoI consider Python 2.latest to be the same language as Python 1.5.2, which was the first I used. They are upward compatible, aside from very small and presumably unavoidable changes. Python 3 is pretty similar, but nonetheless is very different, thinking of it as the same language will cause you grief. Modern advice is to use the 'python2' and 'python3' commands--never just 'python'.
- laggan 7y agoC and C++ are radically different that is not an accurate comparison. Python 3 has many minor breaking changes and few bigger changes. Most huge codebases that support 3 have huge amount of support code that makes it compatible with 2. Probably 80% of the changes in 3 could've been done in an backwards-compatible way, but they actively chose not to. I'm still surprised that python survived it, the update was so incompetently done. Just the huge amount of wasted developer resources on this mostly unnecessary update is staggering.
- pjmlp 7y agoTry to compile any post C89 code with a C++ compiler to see how far you will go. And even then there is stuff like implicit conversions or the ?: operator, whose semantics differ between C and C++.
- downerending 7y agoIndeed, C and C++ have always been two different languages. Hence the "not unlike". I still occasionally see people trying to compile or link C++ with 'gcc'. Does that work? Maybe or even most of the time, but doing that is a sin.