10 ms·
I wonder how many people feel that migrating to Python3 would have been worth doing in the absence of being forced to do so. Dropbox invested three years of wo
by semiotagonal 7y ago
I wonder how many people feel that migrating to Python3 would have been worth doing in the absence of being forced to do so.
Dropbox invested three years of work, actually hired Python's creator, and are still not done. What are they getting out of it that they wouldn't have gotten if Python2 simply had been maintained?
- ogre_codes 7y agoThis is backwards thinking. Yes, it's expensive to upgrade from Python 2 to Python 3, but it's also expensive for the Python project to maintain 2 versions of Python indefinitely. If someone wanted other than the core Python team wants to step up and maintain Python 2, they are free to do so, it's open source. But failing that, expecting the Python team to support the older/ less functional version of the code indefinitely is unrealistic. Corporate owned languages have even shorter lifecycles for exactly this reason.
- coldtea 7y ago>This is backwards thinking. And the alternative is cargo cult "newer is better". >Yes, it's expensive to upgrade from Python 2 to Python 3, but it's also expensive for the Python project to maintain 2 versions of Python indefinitely. On the other hand, they could progressively enhance upon a backwards compatible single 2 version. JS manages to do that just fine, as does Java...
- sullyj3 7y agoBoth Java and Javascript are giant messes.
- coldtea 7y agoJava is nothing like a mess, and JS is going from strength to strength.
- voldacar 7y agoint max = new Max(10, 5).intValue();
- coldtea 7y agoNot sure what's that supposed to be. What's this "Max" class? In any case, that's not some counter-argument, even if it points to a real wart. It's "let me throw a random Java wart, as if it means something, and as if other languages don't have their own warts".
- jusssi 7y agoAnd yet, somehow, Python manages to be a bigger mess than than both of them combined.
- bobbylarrybobby 7y agoJS and Java can do that because they were designed reasonably well from the start. All they tend to add are more features on top of the solid core language. Python's language was not solid (e.g., strings not unicode by default) so they needed a major overhaul.
- downerending 7y agoKind of an odd slam, given that Python (and most other widely used languages) predated Unicode. In any case, I think the jury is still out on whether Unicode in the primary string type is a good idea.
- colejohnson66 7y agoDidn’t C# come out after Unicode (1990s vs 2000)? And they still didn’t implement it properly. Instead, they went with the horrible UCS-2 because it made interfacing with the Windows API easier (it uses wchar_t (16-bit) and UCS-2).
- petre 7y agoI wouldn't call Js a reasonably well designed language but at least it supports Unicode strings.
- teh_klev 7y ago> JS and Java can do that because they were designed reasonably well from the start. Javascript was knocked up over a week or so. Sure it implements concepts from Scheme and other languages but it was certainly not "designed reasonably well from the start". Otherwise we wouldn't have needed books such as Crockford's "Javascript The Good Parts" to help us understand areas of the language to avoid/misuse. > Python's language was not solid (e.g., strings not unicode by default) From the article: "Python itself predates the first volume of the Unicode standard which came out in October 1991."
- int_19h 7y agoIt's funny that you should bring up Unicode strings as an example. Java strings aren't Unicode by modern standards - their char is fixed as 16 bits, because back in the day, UCS2 was "good enough for everybody". So the moment you have, say, an emoji, stuff like length() and indexing is no longer dealing in actual codepoints. And you can slice in the middle of a surrogate pair, and end up with an instance of String that's not even valid UTF-16. Python didn't get Unicode until later, so it had a chance to do it right - and it finally did, even on platforms like Windows where wchar_t is also 16-bit for historical reasons.
- btreecat 7y ago>JS manages to do that just fine How do you define just fine? It's taken us many years to migrate EMCA versions only to have multiple incompatible runtimes. And JS "The good parts" is like 1/10 of the full language so often it feels like a lot of pile on. >as does Java How are them generics?
- avisser 7y agoNow do C#. You are moving the goalposts and ignoring the fact that Python3 still didn't deliver anything for most users.
- ogre_codes 7y agoThis is a hugely American point of view. For anyone who has to deal with unicode on a regular basis, the better unicode support alone is a huge improvement. That's without even looking at the advantages of Async support which offers big performance benefits for web developers—roughly 70% of Python users.
- avisser 7y agoFair criticism. But shouldn't you be even more pissed that the Unicode release was botched and we're still talking about it more than 10 years after? When I upgrade to a new version of C# ... nothing happens. Backwards compatibility is what made Microsoft the company it is. I think Python deserves all the crap it gets for 2 vs 3.
- kick 7y agoAlmost everyone hates both Java and Javascript.
- ncallaway 7y ago> Almost everyone hates both Java and Javascript. I just don't think that's true.
- avisser 7y agoAnd I dislike Python, but that's at best a cool story, bro. This is a story about language upgrades. Those languages showed how to do it right.
- coldtea 7y agoJavascript is a hugely popular language, as is Java. Some hipsters hate "Java and Javascript". The world at large loves them. At some point plain users hated Java applets and Java desktop apps, but those are not a thing much more. In the server space, very few that use it hate Java, and millions use it.
- pmoriarty 7y agoJust because they're popular doesn't necessarily mean their users like them. Lots of people learn and use these languages because: 1 - That's what they're taught at school. 2 - That's where many if not most programming jobs are. 3 - There are a bazillion libraries they can use, compared to other languages. 4 - JS is built in to browsers. 5 - They don't know any better. 6 - Marketing. Also, many companies want their staff to develop in these languages because of the reasons on this list plus that's what most programmers know, so it's relatively easy to find employees.
- cerved 7y agoAh yes, let's turn this into a good old "your language sucks" thread
- jnxx 7y ago> On the other hand, they could progressively enhance upon a backwards compatible single 2 version. JS manages to do that just fine, as does Java... Common Lisp has a backwards compatibility which goes into decades, and implementations like SBCL had no difficulties at all to absorb Unicode. Racket even supports different language standards and completely different languages (such as Scheme and Algol) running on the same runtime. And both SBCL and Racket are compiled languages with a high-end GC which should make such things more difficult than CPython, which is purely interpreted and has a simpler GC. But the incompatibility between Python 2 and Python 3 is perhap s only a symptom of a larger problem. The Python developers have decided that backwards compatibility is not that important any more. This is not a problem for companies like Dropbox, or small start-ups, from which 95 % will not even exist in five years on. It is, however, a huge problem for domains like scientific computing, where most code has no maintainers and even for very important code there is no budget or staff for maintenance: https://blog.khinsen.net/posts/2017/11/16/a-plea-for-stability-in-the-scipy-ecosystem/ https://blog.khinsen.net/posts/2017/11/16/a-plea-for-stabili...
- acqq 7y ago> But the incompatibility between Python 2 and Python 3 is perhap s only a symptom of a larger problem. The Python developers have decided that backwards compatibility is not that important any more. Exactly: and that was a wrong decision for anybody but the developers of Python. Everybody else prefers having something that works: "The improvements are welcome, but please allow us to to run our old programs too, thank you, and allow us to use that new feature only once we need it." It's an obvious expectation. We would also hate a new version of a word processor which wouldn't open our old documents. Or a new version of Photoshop which wouldn't open our old pictures. Or a new version of the browser where only the newest web pages are visible. It follows that it was absolutely technically possible to have a new version of Python in which the old programs still work. It's the failure of the developers that they haven't made it. Compare that decision of theirs with the policy of Linus Torvalds who insists that the old user programs should never break on newer kernels.
- acqq 7y agoAs an example for Linus' "kernel changes should not break user programs" policy, he was famous for using harsh words to pass the message to those who tired to steer otherwise (these words I don't have to repeat, so I'll just quote his main message): https://lkml.org/lkml/2012/12/23/75 https://lkml.org/lkml/2012/12/23/75 "How long have you been a maintainer? And you still haven't learnt the first rule of kernel maintenance? If a change results in user programs breaking, it's a bug in the kernel. We never EVER blame the user programs."
- ogre_codes 7y ago> And the alternative is cargo cult "newer is better". Of course it's a "cargo cult" when someone disagrees with you. > On the other hand, they could progressively enhance upon a backwards compatible single 2 version. JS manages to do that just fine, as does Java... "Just fine"... that explains why so many shops are dropping support for straight Javascript and switching to TypeScript or CoffeeScript before that. And why Javascript is littered with band-aid libraries like Underscore that are needed to turn it into an effective development language. Likewise, Java development is slowly being superseded by Kotlin. Java is a mess, there are often 3-4 ways to do simple things and many of them are just terrible for performance.
- coldtea 7y ago>Of course it's a "cargo cult" when someone disagrees with you. No, it's obviously "backwards thinking", right? >* "Just fine"... that explains why so many shops are dropping support for straight Javascript and switching to TypeScript or CoffeeScript before that.* CoffeeScript was just adopted (and not that much in the first place) because it brought new syntax/features earlier. Now JS has been getting new syntax itself at a great pace and CoffeeScript just died off. As for TypeScript, this is just Javascript + type annotations. Kinda like what Python is getting with 3.6 and mypy, but more useful and with actual tooling available. So not sure how "TypeScript or CoffeeScript" prove anything about JS not doing great. >Likewise, Java development is slowly being superseded by Kotlin. Java is a mess, there are often 3-4 ways to do simple things and many of them are just terrible for performance. Python has 10x+ worse performance, and more than 3-4 ways to do simple things (from package management to basic libs), most of which are just terrible for performance. Compared to that, nobody has had any problem with Java performance for 15+ years... And Kotlin is still insignificant except in the Android space where it's pushed, so there's that. Java sees an order of magnitude more usage.
- ageofwant 7y agoNo, 'cargo culting' is when you don't understand the causal link between cause and effect. Of course "newer is better" in this case, and we know exactly why: Thousands of man days have been spend improving underlying libraries, lessons have been learnt, new ideas stolen from other languages, optimization, security improvements and so on.
- daveguy 7y ago> If someone wanted other than the core Python team wants to step up and maintain Python 2, they are free to do so, it's open source. Only if they name it something completely different from python or py-anything. Guido refuses to allow anyone to just step in to maintain py2. Tauthon is a project that aims to keep compatability with py2 while adding whatever features of py3 that won't break py2 and to have a maintained py2. https://github.com/naftaliharris/tauthon https://github.com/naftaliharris/tauthon
- flukus 7y ago> Yes, it's expensive to upgrade from Python 2 to Python 3, but it's also expensive for the Python project to maintain 2 versions of Python indefinitely. No maintaining 2 versions of python is much cheaper, it's only being done in one place compared to the thousands and thousands of python 2 code bases you'd have to convert. It also only needs bug fixes, there are plenty of people/organisations out there that would be perfectly happy for the language to be unchanging.
- takeda 7y agoThat's only true if you ignore all packages on PyPi. It's extremely hard to keep compatibility with Python 2, many authors can't wait to do the support next year, many already dropped.
- flukus 7y ago> That's only true if you ignore all packages on PyPi. Presumably any packages worth maintaining will have far more dependent projects, so it's still far less overall effort. > It's extremely hard to keep compatibility with Python 2 So don't? I don't think most of the people dragging their feet on the upgrade need or even want new features. A stable python 2 branch with bug fixes and security patches would suffice for most and be ideal for many. Over time the bug fixes should trend to zero and there probably aren't a heap of security issues in python projects anyway.
- crustacean 7y agoThis is such a good point. Take SQL. It has survived because it is well designed, and changes so little and so slowly, and it’s obvious what SQL is and isn’t meant for. Amateur programmers can port SQL queries between database systems semi-painlessly. In the right environment a query can survive with small edits for YEARS. Who wants to break old SQL? Nobody.
- skybrian 7y agoThat's something of an illusion. The flaws in SQL often aren't noticed because you usually pick one database vendor and stick with them. There are plenty of differences between vendors, but you don't usually have to support them at the same time, and you don't notice for simple cases. But changing database vendors for a company can be a big deal, as bad as going from Python 2 to 3.
- just_myles 7y agoThis is true. But, I think he means syntactically you can make jumps from one dbms to another without much of a fuss. Obviously there are non-language features but, that is not what is being discussed here.
- wvenable 7y agoDealing with Unicode in SQL has long been a backwards-compatibility nightmare.
- just_myles 7y agoIn all fairness, dealing with unicode in general has been a pain point for me.
- setr 7y agoThat's mostly a result of databases (kinda) converging, SQL being a declarative language and it primarily being a wrapper around relational algebra, with a bunch of flags. And of course, it's a very direct interface to the RDBMS, and you're just migrating between systems that try very hard to have the same interface. As a language however, it's a whole lot of nonsense. Extremely inconsistent syntax, stuffing a trinary logic into a boolean system, a standard that gets extended arbitrarily, and even the tooling ecosystem is a fair bit pathetic (the lack of formatters particularly annoy me; everyone tries to support SQLs generally, and end up missing every extended feature.. if it's not a simple select query/ddl, you're not getting a decent format output) And it most certainly is a whole lot of fuss to migrate unless your database is tiny, or you didn't actually utilize the DB except as a dumb datastore (eg you relied solely on your ORM + indexes); there's a reason no good translator exists, and those that exist only support a very limited subset of any particular SQL variant, despite programming languages having a whole array of transpilers; it's simply not at all a simple language, and the variants only superficially look the same.
- SignalsFromBob 7y agoI suspect that someone, or a group of people, will step up to unofficially maintain Python 2 for the foreseeable future. It's clear that there are a lot of people using it that either can't easily migrate or are unwilling to do so for the various reasons already discussed in this thread.
- takeda 7y agoI'm sure that for the right money you can find someone. Don't forget that that person/organization would not only have to maintain python but also all the packages that you will be used.
- JohnFen 7y agoIf I encounter Python 2 bugs that matter to me, I can and will fix them myself if needed, and submit or otherwise publish the change. I'm quite certain I'm not the only one.
- marcus_holmes 7y agoWhy not just migrate to 3? genuinely curious...
- JohnFen 7y agoBecause of the amount of work involved in porting my existing Python code. Python 3 doesn't offer any advantages that matter to me, so that's a lot of effort for little gain.
- marcus_holmes 7y agoOK, thanks. Good luck with the bug fixing ;)
- JohnFen 7y agoI'm not really worried about bugs, because the code I have works well, and I doubt I'm going to do any serious new Python 2 development.