6 ms·
I realize this is going to be an unpopular opinion, but I think that for the long term sake of the language, the 3.x schism was bad, and will ultimately be rega
by TylerE 14y ago
I realize this is going to be an unpopular opinion, but I think that for the long term sake of the language, the 3.x schism was bad, and will ultimately be regarded as a big mistake.
In the time the community has spent dealing with/bickering about the transition, other languages have continued to forge ahead, while python just hasn't kept pace.
It hurts me to say that - I like python a lot, but lately it just doesn't seem to have it's mojo.
- gaius 14y agoMy friend, we are still a looooong way from the Perl 5/6 debacle! What language doesn't hit a few stumbling blocks?
- saurik 14y agoPerl 6 and Perl 5 can at least be considered separate languages and separate ecosystems: Perl 5 is still under active development, not just for maintenance but for purposes of getting new language features. It is somewhat confusing that these two languages differ by a number and not by name, but the intention is somewhat clear. In the case of Python, they seriously seem to believe that everyone is going to "upgrade".
- kamaal 14y agoThe other thing about Perl 5 and Perl 6, is the backwards incompatibility gap is way large. And Perl 6 is designed such that Perl 16 shouldn't be necessary. You can't really say the same thing about Python. If Python wants to remain in the game, I don't see how they can do it unless they are OK breaking backwards compatibility in another 6 years. Python broke backwards compatibility for as simple a thing like a print statement. Nobody like to play stupid expensive migration games just because your language designer decided that print statement must be written a different way.
- zokier 14y ago> Python broke backwards compatibility for as simple a thing like a print statement. Nobody like to play stupid expensive migration games just because your language designer decided that print statement must be written a different way. That is a silly argument. They didn't break compatibility because they wanted to change the way print is. They changed the print because they already had decided to break compatibility. Ie "lets break compatibility to change print" vs "while we are breaking stuff, lets fix the print too"
- saurik 14y agoThe idea of "breaking compatibility" is not really a boolean: it is measured in the scalar unit of "difficulty required to regain compatibility".
- zokier 14y agoIn that case I'd say changing print would belong to the "trivial" end of the scale. Print function was backported to Python 2.6, so you can easily write code that is compatible with both. And modifying existing code is so trivial that even an automated tool (2to3) can do it reliably.
- klibertp 14y agoBut what other way there was? It's all about Unicode - it HAS to be resolved at some point, and if what I read is correct than there was no way to make this transition smooth(er). I'm not familiar witr Ruby at all, but I heard there was similar breakage between major versions lately?
- saurik 14y agoThe changes were gratuitous, and there were numerous ways of making it happen more smoothly; for an example of a community that handled it much better, just take a look at Ruby 1.9: they have great uptake. To take a really trivial example: the name "str" should not have been reused to mean "unicode", it either should have continued to mean "bytes" or it should have been dropped altogether. Certainly, under no circumstance, should the name "unicode" have been removed, but it was; they also should not have removed the u'' syntax. Their goal wasn't just "fix things" it was "break old things". The result is that it is nearly impossible to write code that runs on both Python 2.x and Python 3.x even when the semantics of the code have absolutely nothing to do with the things people really wanted to change. Another great example of this is the exception syntax: they changed the way you catch exceptions to replace the "," with "as"; less confusing, sure, but again it means that you can't write code that works on both. The answer to this was then a tool "2to3" which smoothed over some of the more obvious problems, but whose entire mission statement was flawed: to keep all code in Python 2, supporting Python 3 as a second-class citizen. A lot of these changes, certainly the syntax ones, could easily have been made per-file: make new scripts .py3 or have a special header, or force old scripts to have a special command line argument or special load path. At least then, you could mix and match new and old code without simply being stuck in the limbo that is Python 2.7... a limbo that didn't even help the cause, as you can't even write fully 2.7/3.x compatible code. The result is that we still have tons of libraries that don't work. When they do, they often have less testing. When they are well tested, they often "took the opportunity" (just like Python itself, which set the bad expectation) to have different semantics, so you have to port your code anyway.
- deleted 14y ago[deleted]
- agentultra 14y agoYou should avoid making technical decisions based on emotional impulses. Technically Python 3 is superior, IMO, to Python 2.7 and barring any setbacks such as unported libraries (which are becoming increasingly scarce) I wouldn't start a new project in Python 2.7. The reason libraries have been taking so long is because so many people are resistant to change that they hadn't begun making any serious efforts to port to Python 3 until 2011 by my estimation. Python 2 is so ass-backwards and broken that I find it painful to use on large code bases. It conflates strings and byte streams, has pathetic Unicode support, and its libraries are rife with bit-rotting code. For the batteries to continue being useful they need to be updated once in a while. Have you seen urllib? It's atrocious by today's standards! Python needed an update and I think that the core team made the right choices. The challenge has been porting and the core team knew that. They made some poor decisions in hind-sight such as 2to3 and dropping u"", but otherwise the porting story is not as painful as it seems. Cherrypy did it ages ago and Django is finally getting around to it. SQLAlchemy supports Python 3. There are fewer reasons not to switch than ever before and yet articles like this still come up to this day. Python is only going to fall by the way-side if the developers of the language decide to stop using it. The language hasn't gotten worse by any stretch of the imagination. It needs more contributors to make it better. If you like it so much, port your libraries, contribute to python core, and stop complaining! It's been like five years people!
- cmccabe 14y agoSorry in advance that this is so negative, but it reflects my honest feelings, as well as some experience. The big problem with Python was always predicting what any given piece of code would actually do. Considering the lack of static typing, pervasive use of exceptions for non-exceptional cases, and subtle behavior changes in the core language from version to version, you basically never knew what you were going to get. On the plus side, all the Python libraries I ever used were open source and the code was easy to access. On the minus side, I needed to access that code on a daily or even hourly basis. Getting something working on my own machine wasn't too hard. Getting something working on anyone else's computer was a challenge. It seems that most Python developers now use virtualenv. This is a handy little tool that creates a small runtime environment for your Python program. Basically, it allows you to explicitly set the version of every library that you use. I always viewed virtualenv as a sign of Python's failure. Having stable APIs is damn near impossible in Python, so let's just give up and use old versions for everything. Put the whole mess in an airtight chamber, and hope you never need to do anything with it in the future. With an attitude like this, it's no surprise that the adoption of Python 3 has been pushed off into the indefinite future. Issues like the global interpreter lock (GIL) and lack of real GC for data structures with cycles just reinforce the impression of a better /bin/sh, not a serious language. Sadly, in some ways, Bourne shell is still the better language, because it got backwards compatibility right, has a bigger install base, and better startup time. It's also significantly less verbose for simple tasks. And really, if your task isn't simple-- you shouldn't be using a language that doesn't even properly support threads. tl;dr: Overall, I think my interest in Python has come to an end. It's over, sorry.