Hacker News new | ask | show | jobs
by no_wave 960 days ago
It was pointless. The python core team decided to obsolete every existing line of python code in exchange for basically nothing. On top of it a few features were changed in ways that felt outright vindictive (division, the u'' convention being the ones that affected every single codebase).
1 comments

Unicode was a meaningful change to the language that it's difficult to imagine could have been done without breaking compatibility or repeating C's mistakes. There isn't much excuse for the rest, as forks with miniscule development resources managed to backport everything else. 3 did turn out a generally nicer language than 2, even if it was slower and caused a solid decade of pain.
Except that python2's `unicode` was a mistake. We already knew at the time that "just use utf-8 for everything, and never use numerical indexing" was the way to go, but instead python3 decide to leave us with no working string class, as opposed to python2 which at least had a mostly-working one.

That said, the major forces against the transition were that it was impossible to write code that worked with both versions for a long time:

* python 2.7 added support for a few python3 syntax/library features, but python 2.6 was very widely deployed on stable distros.

* it wasn't until python 3.3 (very late to actually be deployed) that you could even write a unicode string literal (you know, the thing the claimed the transition was all about) that still worked in python3

* python before 3.3 had a completely bogus idea of "unicode" on Windows anyway, even ignoring the API nonsense.

* python 3 completely broke the way indexing worked for `bytes`, making it produce integers (rather than single-codeunit instances) of all things.

* there was a lot of gratuitous package breakage. Instead of leaving deprecated shim packages, they just removed them, and you hard to add a third-party dependency to get something that worked with both versions (and said dependency hooked into core parts of the interpreter in weird ways).

It wasn't until around 3.5 that there started being any actual advantage of python3 at all. But there is still tons of code that is no longer possible to write.