Hacker News new | past | comments | ask | show | jobs | submit login

The syntax changes introduced in python 3 are easy to fix, and most of them are backwards compatible with python 2.7.

The whole string/byte dichotomy, however, is a major change that I don't think any shim layer could handle correctly without major bugs, short of defining a whole new string-like class.




The shim layer would have to convert all strings from v2 representation every time to the v4 implementation. Slower, but at least v2 could run unchanged. As we all know certain code won't be touched for whatever reason. It could certainly prevent some from deciding to move off to other languages like Go, Elixir, Node.


Your shim layer would have to make assumptions on the encoding of your strings, which can lead to nasty bugs.

And also handle reading from files correctly, or list file names from the os, or anything that communicates outside of the python interpreter.

The main reason why python 3 was created was to manage these complexities, and even then some people[1] say it wasn't done properly.

[1] http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: