17 ms·
The Case Against Python 3
- ayrx 10y ago> Currently you cannot run Python 2 inside the Python 3 virtual machine. Since I cannot, that means Python 3 is not Turing Complete and should not be used by anyone. I stopped there.
- rosstex 10y agoI came here to post this. What?
- ramblenode 10y agoI did the same. I honestly wonder if there is a single other developer on earth who is troubled by the inability to write a Python 2 runtime in Python 3.
- dhatch387 10y agoA programming language "is said to be Turing complete or computationally universal if it can be used to simulate any single-taped Turing machine" [1]. This author doesn't seem to understand this concept properly. [1] https://en.wikipedia.org/wiki/Turing_completeness https://en.wikipedia.org/wiki/Turing_completeness
- ayrx 10y agoAnd if he doesn't understand that concept should he _really_ be teaching anyone programming?
- hsitz 10y agoI'm pretty sure that if you understand both Turing completeness and the practice of actual programming, then you know that in most cases the one has virtually nothing to do with the other. (Which is not meant at all to imply that the author of linked article understands Turing completeness, just that even though he doesn't seem to he could still be excellent at teaching programming.)
- Vendan 10y agoThen the question becomes "why is he talking about turing completeness, something that is either irrelevant, or that he knows nothing about?"
- JBReefer 10y agoI mean it sounds very nice and fancy - but loop semantics and conditional jumps have nearly nothing to do with what he's talking about.
- esaym 10y agoHeck no he shouldn't.
- emodendroket 10y agoI'm pretty sure this was a tongue-in-cheek way of stating the true criticism.
- noobermin 10y agoI'm wondering that here. The whole article feels over-the-top, perhaps it's a well crafted parody, an extreme sense of sarcasm? May be he is a Python 3 lover after all.
- emodendroket 10y agoIsn't over-the-top Zed Shaw's "thing"?
- brianwawok 10y agoDitto. Then I read more for laughs. I kind of feel like I could fix py2to3 if I have a sed and awk layer in there.. maybe a fun project.
- ayrx 10y agoIn my experience a lot of the problems with automatically converting existing Python 2 code to Python 3 code is that the Python 2 code usually makes fundamentally broken assumptions when it comes to unicode and bytes.
- haikuginger 10y agoThis is what the author doesn't get- the fact that Python 2 makes no distinction between bytes-like objects and string-like objects is a bug, not a feature. He finds his code so awful to migrate because he has built it on a contrary assumption.
- esaym 10y agolol, winning.
- aperetto 10y agoI was working on a side project and ended up upgrading because I could figure out how Python was encoding my data. I got so frustrated with the semantics I found it easier to jusy upgrade.
- aminorex 10y agoDefinitely disagree. I am a literal genius, wrote compilers, learned a dozen programming languages for fun, but prefer to do hard things. Yes p2 handling of coding is broken, but p3 is much worse. Making a theoretical argument about a pragmatic problem is a category mistake. And it's not even the core of Zed's expressed concern, which is the arrogant and abusive manipulation of the user community in service of the interests of self-obsessed project.
- 10y ago
- JustSomeNobody 10y ago> THERE IS A HIGH PROBABILITY THAT PYTHON 3 IS SUCH A FAILURE IT WILL KILL PYTHON. I stopped there.
- flukus 10y agoIsn't this what killed perl?
- petre 10y agoPerl is alive and well, thank you.
- whyenot 10y agoI think it would be more accurate to say that it is alive but largely forgotten. Perl6 is very cool, but has not gained much traction.
- flukus 10y agoSure, it's just resting.
- BerislavLopac 10y agoNo, that's Parrot.
- sampo 10y agoCorrect me if I'm wrong, but the idea of perl6 was announced in 2000, and perl6 was finally published in 2015. So there was a 15 year gap when perl5 was perceived on its way to become obsolete, but perl6 was not available. I am unsure when the idea of python3 (first as python 3000) came to general knowledge, but it must have been some time between 2000 and 2004. Then python3 was published in 2008. So the time between obsoleting the old version, before the new version was available, was notably shorter with python.
- 10y ago
- haikuginger 10y agoI also can't run Python 2 by passing it into a C compiler. Man, I should publish a paper on this- they thought C was Turing-complete, but I proved them wrong!
- agumonkey 10y agoStop, it hurts. Too much.
- geezerjay 10y agoConsidering how C has been targeted for all sorts of nonsense, I suspect that your argument would be somehow used as irrefutable proof that C is outdated and deprecated. At least that's the conclusion that is repeatedly forced upon C, no matter what the argument is.
- Tomte 10y agoYes, the author doesn't know what he's talking about. But people talking about Turing completeness in a real programming language (usually in the form of "x is Turing complete, therefore you couldn't ask for more") almost always haven't got a clue.
- hexane360 10y agoI just point them towards Unlambda. Turing completeness in three characters (plus one for output) http://www.madore.org/~david/programs/unlambda/#what_is http://www.madore.org/~david/programs/unlambda/#what_is
- lokedhs 10y agoUnlambda as a language may be a joke (the funny kind), but learning it is incredibly enlightening, and makes you understand some fundamental concepts of computer science. As such, I think it represents one of the most enlightening esoteric languages out there together with Brainfuck.
- ant6n 10y agoTrue. No programming language has infinite tape.
- elsen 10y agoActually some kinda does: "Garbage collection is simulating a computer with an infinite amount of memory". https://blogs.msdn.microsoft.com/oldnewthing/20100809-00/?p=13203 https://blogs.msdn.microsoft.com/oldnewthing/20100809-00/?p=... We both agree, I'm just using this as a pretext to share this intriguing piece of knowledge. I find the concept much more intuitive than "getting back unused memory". Especially when you look at the 90% memory usage on your OS, it still make sense with the "infinite memory simulation" definition.
- waterhouse 10y ago> But people talking about Turing completeness in a real programming language (usually in the form of "x is Turing complete, therefore you couldn't ask for more") almost always haven't got a clue. There is a fun quote about that... "There are those who tell us that any choice from among theoretically-equivalent alternatives is merely a question of taste. These are the people who bring up the Strong Church-Turing Thesis in discussions of programming languages meant for use by humans. They are malicious idiots. The only punishment which could stand a chance at reforming these miscreants into decent people would be a year or two at hard labor. And not just any kind of hard labor: specifically, carrying out long division using Roman numerals. A merciful tyrant would give these wretches the option of a firing squad. Those among these criminals against mathematics who prove unrepentant in their final hours would be asked to prove the Turing-equivalence of a spoon to a shovel as they dig their graves." -- Stanislav Datskovskiy
- esaym 10y agoYea I skimmed the rest. This makes me ashamed that I even bought the guys book (Learn Python the Hard Way). His attitude is what is going to kill python, not python 3. I moved from Perl 5 to Python 3 hoping to flee the internal dev fighting and attitudes, yet here I am again. I'll say this, at Pycon 2016 I attended some dev sprints/hackathons with the python 3 developers. Python 2 is no where on their radar, its dead. They have moved on. There will be no additional compatibility layers or any of that. All of the mainline libraries that everyone uses (django, sql alchemy, etc ) have moved on to python 3. If you haven't, you should to.
- ant6n 10y agoPypy hasn't
- viraptor 10y agohttp://pypy.org/download.html http://pypy.org/download.html py3.3 support is at alpha level. py3.5 support is in the pipeline and already available for testing. It's unlikely they'll do any effort that's targeting py2 specifically anymore.
- ant6n 10y agoBeing in alpha isn't exactly 'having moved on' ;-)
- mattip 10y agoBut there is a plan and the milestones are being achieved.
- rbanffy 10y ago> His attitude is what is going to kill python No. The rest of the community is much better. In fact, his behavior is an aberration.
- lern_too_spel 10y agoThen you missed his crazy notion of what static typing is and his failure to understand the difference between a string and a byte sequence. It's incredible that someone who knows so dangerously little about Unicode has written a web server that is so popular in the Ruby community. It says something about the quality of the language's ecosystem.
- wyldfire 10y agoFrom the article: > Python 3 has been purposefully crippled to prevent Python 2's execution alongside Python 3 for someone's professional or ideological gain. I can't tell if Zed's referring to python3 doing a fork()/exec() of a python2 not working correctly or if he wants/expects some kind of inter-language import or "linking" among files written for respective language versions. What's he getting at? Is there really something that prevents you from executing python2 at the same time as python3? (I tried a simple program "os.system('python3 -c \'print ("hello")\'')" and it worked just fine.
- emodendroket 10y agoI'm pretty sure what he wants to say is that it should let you use libraries written for an older version of Python than you are using, much like the CLR would do if you wanted to use a library written using an older version of C# than you're using (or a different language targeting the CLR, for that matter). I'm pretty sure the claim that Python 3 is "not Turing-complete" is just a hyperbolic mockery of the claim that that isn't possible to do. N.B.: I haven't worked with Python so if you can actually do this somehow let me just say that that's not the impression the article left me with.
- AstralStorm 10y agoThis is doubly wrong as PyPy which runs Python 2.7 works in CPython 3.
- felixschl 10y agoSame. That's when I came back for the comments on HN
- rootw0rm 10y agosame. i can't tell if he's serious or not and i don't really care.
- deleted 10y ago[deleted]
- Biganon 10y agoFirst I spit my coffee when I read that too, but let me play devil's advocate (because I pretty much disagree with the entirety of his rant) : he's pointing out that since it's technically feasible to write a Python 2 interpreter in Python 3, and since it should even be pretty easy since the two languages do not differ immensely, then the only reason why it hasn't been done and there's no -2 flag to python3 has to be an ideological reason, a manipulation by the core devs to impose their ideas by force. It's extremely badly conveyed but that's what I got out of it by keeping reading. I do disagree with him on all the rest though, especially strings. It didn't "just work" before, it failed silently and who knows how much disaster he or his readers have caused because of it. Now at least you can't be wrong anymore. For a language heavily used on the web, it's hugely important to understand where your strings are coming from and where they're going to, and how. Besides, Python is not a frigging "beginners language". Just because Python (and admittedly especially Python 2) is generally easy to grasp as a first language doesn't mean it's its purpose, nor should it constrain itself toward this goal. It's used in a million of different areas, including pretty sensitive ones. It's now become a more mature language, reaching for exactitude and consistency. Just because Zac no longer has an easy toy language to point script kiddies to so they can "learn to program" by reading one website doesn't mean Python is to blame.
- kayman 10y agoPython was one of the first languages I've tried I actually enjoyed programming in. I hope to continue leveraging my investment in learning python by using it for a long time. So far I haven't been forced to use Python 3. I've tried a few times but always found it easier to just go back to python (2.7). I figure eventually I have to use Python 3 but at this point, my life has been fine without upgrading to python3.
- unethical_ban 10y agoAs a writer of "quick n' dirty" webapps for internal use, I use python3 because philosophically, I want to help the world move forward, and the standard library has more stuff in it.
- brianwawok 10y agoDitto. I have submitted at least 10 PRs to fix Python3 bugs in OSS projects directly because of this. So perhaps I have made the world .000001% better.
- ambivalence 10y agoThank you!
- IndianAstronaut 10y agoI think Python is amazing to get small stuff ip and running and quick scripts, but it quickly becomes a nightmare as the project scales up.
- TylerE 10y agoWhy would you say that? The main Python project I work on is 271k LOC... no problems here.
- IndianAstronaut 10y ago
- mastazi 10y agoOn the other hand, I never suggest Learn Python The Hard Way or Codecademy to any new programmer, because I don't want them to ask me down the line "why you directed me to an obsolete Python course?". I think I'm not the only one. So I'm not sure what's the net result of those decisions made by the two sites, do they really help in keeping Python 2 alive?
- emodendroket 10y agoWell, it seems to me like that's the whole "may kill Python" thing he's talking about.
- mastazi 10y agoI don't know, a week doesn't pass without a new deep learning Python framework being launched, Python dying doesn't just seem the case to me.
- raymondh 10y agoFWIW, I do recommend Zed's book. Many, many people have benefitted from Python The Hard Way.
- mastazi 10y agoI have too, but I learned Python in a time where learning Python 2 was still politically correct.
- esaym 10y agoI attended a few newbie classes at pycon2016. A few of them suggested Learn Python The Hard Way, to which I pointed out how the author states to never try installing python 3 on the first page.
- AstralStorm 10y agoThe author should essentially be banned from community and his book no longer recommended after that lest someone believes him. You're essentially giving up great features like async keyword and proper encoding handling getting nothing in return. The few libraries that are still Python 2 only should be ignored.
- hayd 10y agoand most importantly the book Learn Python the Hard Way only supports python 2.
- p10_user 10y agoA lot of the basics work in both, or with some minor tweaks.
- joelg 10y ago"Python 3 Is Not Turing Complete" ... Not only is this blatantly false, but the author acknowledges it as such and seems to think that it is still OK to write this sort of sentence. Backing a pure falsehood with anecdotal support from "actual Python project developers" does nothing to change its veracity. I can't respect anything else in this article after seeing this kind of sensationalism. Perhaps the author doesn't understand Turing-completion (I'll give the author the benefit of the doubt), but even if so it's inexcusable to throw around this sort of technical language this casually.
- revelation 10y agoWhy the hell even bring that up. Not a very good tutorial in any way when the writer starts throwing around unrelated terms they don't grok.
- AstralStorm 10y agoIt is also wrong, as PyPy interpreting Python 2.7 runs well in Python 3.
- komaromy 10y ago> The fact that you can't run Python 2 and Python 3 at the same time I'm confused by this statement. I can start a python2 interpreter, background it, then start a python3 interpreter. Is there some other area that they inhibit each other in?
- edoceo 10y agoNo, unless you really try to confound them together
- kevans91 10y agoIt sounds like the author's just miffed about incompatibilities in general -- specifically, that they can't (necessarily) import python 2 code whilst running under a python 3 interpreter and vice versa.
- 0xcde4c3db 10y agoI think the author means that there's no single interpreter that supports both languages (a la DrRacket's #lang directive, perhaps?).
- haikuginger 10y ago> Also, it's been over a decade, maybe even multiple decades, and Python 3 still isn't above about 30% in adoption. Python 3 was released in 2008. Eight years ago.
- anamoulous 10y agoThat's also about the time Zed switched to Python. https://web.archive.org/web/20080305002455/http://www.zedshaw.com/blog/2008-03-02.html https://web.archive.org/web/20080305002455/http://www.zedsha...
- forgottenacc57 10y agoZed just needs to be at war with something.
- Analemma_ 10y agoThe thing about Zed is that his shtick was originally a joke: a parody of overconfident asshole programmers. But... well, like Orwell said, "He wears a mask, and his face grows to fit it."
- smitherfield 10y agoI mean, his original unhinged rant[0] was 9 years ago now. [0] http://harmful.cat-v.org/software/ruby/rails/is-a-ghetto http://harmful.cat-v.org/software/ruby/rails/is-a-ghetto "I’ll add one more thing to the people reading this: I mean business when I say I’ll take anyone on who wants to fight me. You think you can take me, I’ll pay to rent a boxing ring and beat your fucking ass legally."
- choicenotchance 10y agoThis author is nuts. "Python" and "dead language" in same sentence? Maybe if it was Perl or Java, I'd have understood. P.S: I'm really sorry Java guys, I know Java isn't going to die, atleast not for another 100 years, but since I don't like it much, I'm putting it in the list here.
- justinator 10y agoHowdy Zed, there's a small typo in your printf statement. As written, x = 'Zed' print f"Howdy {x}" Should read, x = 'Zed' printf "Howdy {x}" I was under the suspicion that, "f" was some sort of operator or something, much like q is for Perl, print q{Howdy Zend};
- rryan 10y agoNo, it's correct (new in Python 3.6): https://www.python.org/dev/peps/pep-0498/ https://www.python.org/dev/peps/pep-0498/ The print statement however is not valid Python 3 :).
- deleted 10y ago[deleted]
- rat87 10y agonope it should be print(f"Howdy {x}") It's a new python 3.6 feature called f-strings/string interpolation https://docs.python.org/3.6/reference/lexical_analysis.html#f-strings https://docs.python.org/3.6/reference/lexical_analysis.html#... That said in python3 print is a function not a statement and requires parenthesis so he still has a typo.
- pmontra 10y agoI know f-strings but I still can't believe them. There are parts of Python that look like it wants programmers do low level compiler job and I can't understand why. This is one of them. Python can do %s string interpolation without some s'' s-strings so I wonder why it needs this f-string thing. Many languages can do string interpolation without having developers babysitting the interpreter. In 2016 we have the CPUs to make it happen the other way around.
- rat87 10y agoIt has to do with backwards compatibility in syntax if they had been smart enough to introduce in python3 they could have done it without the f.
- waits 10y ago> In the programming language theory there is this basic requirement that, given a "complete" programming language, I can run any other programming language. In the world of Java I'm able to run Ruby, Java, C++, C, and Lua all at the same time. In the world of Microsoft I can run F#, C#, C++, and Python all at the same time. This isn't just a theoretical thing. There is solid math behind it. Math that is truly the foundation of computer science. What does this even mean?
- hexane360 10y agoSomeone doesn't realize they actually have to do work, even if a language is turing complete.
- Ardren 10y agoI think he's trying to suggest that the Python VM should be separate, and have both Python2 and Python3 target it (and potentially other languages) But who knows, his actual argument is absolute mess
- jsvcycling 10y agoSo many inaccuracies and exaggerations that it feels sarcastic.
- noobermin 10y agoI'm getting the sense it is, but he doesn't make it obvious at all (hence it's funnier to him?)
- misingnoglic 10y agoIf it was so easy to do some of these things that the author wants, why hasn't someone already done it?
- kartD 10y agoPretty sure Zed's playing a joke on experienced programmes. He's clearly mentioned that the book is for complete beginners and that's why the entire section for experienced programmers is crap. Funny how many haven't seen it and are arguing pointlessly.
- harpocrates 10y agoIs this actually a joke? I'm still kind of reeling. The typos, the technical inaccuracies, the logical fallacies, all bundled together... Is it trying to satirize something? If not, what is the blog post trying to do?
- kartD 10y agoHe definitely is... I just checked his twitter to make sure I'm right. He's clearly joking. https://mobile.twitter.com/zedshaw https://mobile.twitter.com/zedshaw
- AstralStorm 10y agoShould be clearly stated on the page. Because Poe's law.
- kartD 10y agoAh but where's the fun in that? Just look at the number of people who've jumped the gun. Makes me wonder about the media and how we consume information in general...
- smegel 10y agoI didn't know Zed Shaw was that stupid. Or is he just trolling?
- tschellenbach 10y agoAfter 8 years the man has a point, most of his arguments are not correct though. Conclusion stands, python is shooting itself in the foot.
- guntars 10y agoCan the conclusion stand if the arguments are not correct? I'm sure there are other, better arguments out there, but after reading this from top to bottom I'm getting the idea that the resistance to Python 3 is mostly irrational.
- adambrenecki 10y ago> Can the conclusion stand if the arguments are not correct? It can; arguing it can't would be an 'argument from fallacy', itself a fallacy. Put another way, I can make up a totally absurd, incorrect argument that the sky is blue, but the sky is still blue. I can also make up a totally absurd, incorrect argument that the sky is green, but it isn't. An argument that doesn't hold water doesn't say anything useful about the conclusion either way.
- AstralStorm 10y agoThat said, the conclusion is still false, given how many projects have since converted to or supported Python 3. And a bunch are Python 3 only.
- JBReefer 10y agoI don't know how much it is Python shooting itself in the foot, I wonder if it's not a management issue. Though he may be stubborn, I can't see the 2 v 3 split happening under Rob Pike - I think this is fundamentally a Guido problem. If Guido had said "2 is done. Deal with it, fuck you." a long time ago, this wouldn't be an issue today. Breaking language changes are nothing new, but mgmt this weak is. Hell, I primarily work in C# and I LOVE the breaking changes of .NET Core and Standard. They tore the garbage out, and it runs on Linux. Awesome!
- awinter-py 10y agoThe argument is bad but the headline has a point: the value of a language is the quality of its libraries and the community that maintains it. Python 3 seems like a mistake; it fractured the community and sent people away. (to golang, to scala, probably even to ruby). If I were a library maintainer on py2 I would have felt betrayed by py3. Suddenly print is a function? 'yield from' won't be available on the py2 branch? Yikes. C++ is an example of the serious negative consequences of language change. The language has been in flux for decades and the 3rd-party code shows it. Some fraction of good libraries rely on c++14 features. Many others duplicate in library code features that have been available in the language since c++11 or earlier. Boost, the 'missing standard library' for cpp, is something you either love or hate. The end result for c++ in 2016 is that large shops either (a) don't use it or (b) don't use the new features and have a slow acceptance process for 3rd-party libs. You can argue that the C community is healthier than C++ -- a ton of important system libraries are written in C and have bindings to tons of languages. Yes, they have problems (openssl cough), yes nobody understands unspecified behavior across compilers, but C has done a good job of supporting lots of platforms and staying relatively stable. Betraying the community can kill a language. Perl learned this lesson the hard way. Let's hope python can be saved.
- deleted 10y ago[deleted]
- Alex3917 10y agoPython still has the best libraries of any language, and almost every library has full Python 3 support. The real issue is with legacy codebases that are going to need to upgrade from Python 2.7 to 3.5 or else switch to PyPy by 2020
- haimez 10y agoDon't hitch your wagon this this garbage. If you think the 2 to 3 transition is a harbinger of doom, write your own blog post about it.
- viraptor 10y ago> Suddenly print is a function? from __future__ import print_function Now you've got print function in python2. > 'yield from' won't be available on the py2 branch? And 2.6 doesn't get set literals. And 2.5 doesn't get "with" statements. And ... There's got to be a cutoff somewhere. Or we'd just have an eternal 1.0 with all the features backported to it.
- garbage_stain 10y agoThis is an excellent treatise on both the value of a computer science education and the importance of being sure that things you say in public aren't verifiably false.
- tschellenbach 10y ago"It's sad to watch Python destroy itself because it's such a great language, but that seems to be where things are headed." The author has a point here. I've been programming Python for about 10 years now. Really concerned about the future of the language. Languages like Node and Go are progressing rapidly, but what's happening to Python? I used to complain about Node, but with the latest ES6/ES7 improvements it's actually pretty decent. The difference in usability between npm and pip is also huge. Python is still my favorite language, but they really need to fix this part of the ecosystem. Maybe it's time to release Python 4 that has a clean upgrade path from 2 and enough language improvements to encourage users to adopt it?
- SEJeff 10y agoNode is an interpreter for the v8 JavaScript engine and it uses a language named JavaScript. There isn't a language named node :) I've done Python about as long as you but also like Golang for things Python is awful at.
- kough 10y agoJavascript is a colloquial name for what is formally known as ECMAScript. There isn't a language named JavaScript :)
- StevenNunez 10y agoNetscape would like to have a word with you.
- banachtarski 10y agoI would argue the technicality you pointed out is a lot more minor than the OPs. The OP was basically talking about the JVM as if it was a language. *edit typo
- kqr 10y agoWell, there is a Jim language, it's just not something you'd want to write by hand...
- epberry 10y agoOne feature of Python 3 that I found really pleasantly useful recently (thank you SO :) ) was passing generators to the zip() function in a for loop, like: for a, b in zip(generatorA(), generatorB()): In Python 2 you have to import itertools to do this. I bring this up because I find examples like this all the time in Python 3 where core, modern language features like generators are more tightly integrated and easier to use. It's really a better version of the language and if you're starting fresh on a Python project you should do yourself a favor and use it.
- mattdeboard 10y agoNaw, `zip` is a builtin in py2. You might be thinking of `itertools.izip`? https://repl.it/E5v6/2 https://repl.it/E5v6/2
- Goopplesoft 10y agozip in py2 returns a tuple type (i.e tries to consumes the iterator through a StopIteration) in py3 it returns a iterator (consumes it on demand). Try this in py2: https://repl.it/E5vd/0 https://repl.it/E5vd/0
- deleted 10y ago[deleted]
- mattdeboard 10y agoI'm not near a real REPL, what's the diff? Eager vs. lazy? I think I remember reading something about that change awhile ago.
- reubano 10y agoExactly. Py3 zip is lazy like py2 izip.
- sk1pper 10y ago> a more stable language like Go, Rust, Clojure, or Elixir Uhhh..? A more trendy language? Are we really saying that Elixir is more stable than Python?
- trymas 10y agoI would guess that he just doesn't want to update his courses. EDIT: https://learnpythonthehardway.org/book/ex0.html https://learnpythonthehardway.org/book/ex0.html Wow - python 2.5.1. He even does not update to 2.7. Last login: Sat Apr 24 00:56:54 on ttys001 ~ $ python Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12)
- anondon 10y agoApart from his argument that Python 3 is not turing complete, which has been torn apart in the comments, can someone evaluate the other arguments. Are the other criticisms valid? If not, why?
- viraptor 10y agoI think some are valid criticisms, but not valid enough to throw your toys out of the pram. > Not In Your Best Interests I say what's in my best interest and py3 fixed a lot of issues for me. I'm happy with the upgrade and dropped py2 for new projects this year. > No Working Translator A flawless translator is simply not possible. 2to3 is the best effort idea. At some point you'll run into `def f(x): return x[0]` and without doing a full program static analysis you won't be able to say what's the right translation. You have to do it manually where needed. > Difficult To Use Strings I understand that the py2's "just works" strings are easier. But at the same time, having a non-ascii name I know that most applications "just work" simply because nobody actually tested them outside of ascii set. Py3 doesn't explode on encoding for fun - it basically says: you made an assumption that kind of worked so far by accident, but now you need to say explicitly what you want to do. I think it's a good thing, even if it takes people time to adjust. > Core Libraries Not Updated I don't even know what he means. This really needs an example, or it's just a meaningless rant. > Purposefully Crippled 2to3 Translator As above. Some things are just not possible to translate without knowing what the programmer meant. Some things in py2 strings happened to work a bit "by accident" and simply won't work in py3 for good reasons. For example py2 code: In [1]: "abc".encode('ascii').encode('ascii') Out[1]: 'abc' It may look silly on one line, but there's lots of applications that relied on py2's "it just works" strings - and this what was effectively run at some point in the code logic.
- andreareina 10y agoAdoption is a real issue, but one that can be helped by actually using Python 3 (and encouraging others to use it), assuming you think the language is better. Big organizations have more clout here, for example Arch Linux uses Python 3 as the default Python interpreter. The string/byte confusion is an issue for people who like to pretend that they're the same. They're not. A string can be represented by different byte streams depending on the encoding. That by itself tells you that they are not the same and should not be treated as the same thing. But we have many decades of conflating the two, and old habits die hard. It's convenient to treat them as the same because IO deals with bytes and `write(some_string)` is easy. JavaScript's `"42" == 42` is just as easy, and just as wrong. The solution is both simple and easy: convert between strings and bytes at the IO interface. Explicit is better than implicit.
- saulrh 10y agoThe "Don't use it because people don't use it" argument bugs me. That's a valid argument when you're a CTO or Employee 0 picking a language that a thousand people will be using for fifteen years. Putting it on a tutorial site with good google juice, on the other hand, is a sad self-fulfilling prophecy.
- hcarvalhoalves 10y agoThere's good criticism here, but I can't help but feel the rest is mostly Zed flipping out. Regarding 2to3 not being flawless: agree, could be better. Regarding core libraries: agree, but the same problem exists on Python 2 (different core libraries have different levels of compatibility for taking string or unicode as arguments), so I don't see how this can be a recommendation against 3 specifically. Regarding new string types and handling, this has been discussed over and over again everywhere on the web, and boils down to people freaking out at unicode by default. This one does a good job explaining everything: http://www.diveintopython3.net/strings.html http://www.diveintopython3.net/strings.html and this one does a good job at showing what you get w/ Py3 (not limited to new string types): https://speakerdeck.com/pyconslides/python-3-dot-3-trust-me-its-better-than-python-2-dot-7-by-dr-brett-cannon https://speakerdeck.com/pyconslides/python-3-dot-3-trust-me-... Regarding complaints about how many string interpolation methods there are: the `f` method relies on local scope (which is prone to introducing bugs), so it's actually pretty gimmicky compared to `.format` (which takes an explicit data structure as parameter). I would do the opposite and only teach `.format` to beginners since it leads to better code. Regarding Turing completeness: fun.
- viraptor 10y ago> Regarding 2to3 not being flawless: agree, could be better. The thing to remember though is that 2to3 will never be flawless. Since the underlying representation of some things has been split into different types, it simply impossible to automatically fix some code. For example a function returning the first letter read from a file object is going to be completely different and more explicit in py3 than it was in py2. And the end result it better. You have to fix some code now - tough.
- morecoffee 10y agoThe difference between a programmer and a computer scientist.
- 0x0 10y agoInteresting how this unicode string thing in py3 seems so similar to php6. Which was canned because it turned out to be a flawed design, and php7 continued where php5 left off (fortunately!)
- Ndymium 10y agoIt wasn't canned because it was a flawed design. It was canned because they couldn't make it work well enough technically. Encodings are still a total mess in PHP unless you are very careful (no runtime errors, you just run with it and maybe you'll see correct output or mojibake in the end).
- amasad 10y agoI run Repl.it (https://repl.it https://repl.it) and I have an interesting stat. Python3 has been loaded 3.6x more times than Python2 (500k vs 140k) just in November, and it's been used in 5x more classrooms (https://repl.it/classroom https://repl.it/classroom). * two caveats: - we have Python3 listed on the languages page whereas you'd have to click around or search to get to Python2. - we have slightly more features on Python3 like live pylint and ability to use modules
- joatmon-snoo 10y agoDefinitely the listing thing. I remember trying to demo something for a friend and went looking for Python 2 on your site and it took a good few seconds to find it.
- mathgenius 10y agoWow, this guy seems really pissed off. But I must admit, it is nice having all those python developers distracted by working on another language and leaving 2.7 in its current state of perfection. I wonder if this has actually helped increased the use of 2.7, not having endless "improvements" tacked on. It sounds like this could be one of those weird laws of the computer age. I dub thee "Shaw's Law".
- minimaxir 10y agoThere was an amusing discussion last week in a Facebook group about this exact topic: "So there were 7 applicants and I rejected 7 because they sent in their demo assigments in Python 2.7. Come on people, its nearly 2017!" https://www.facebook.com/groups/hackathonhackers/permalink/1399902436731904/ https://www.facebook.com/groups/hackathonhackers/permalink/1...
- snuxoll 10y agoI honestly don't get how this is still even an issue, if you're stuck with libraries that haven't been migrated to Python 3.x you have my sympathy - but I have had 0 need to touch any Python 2.x code in over 3 years - in fact, all of the Python code I have deployed at work is Python 3.x only. Python 3 is a non-issue in my eyes, the only reason I don't use it more is because there's only one other developer on my team that knows Python well enough to maintain anything if I get hit by a bus - Python is "weird" for everyone else because we're mostly a .Net shop, so unless I'm writing an ansible module I use Kotlin and Spring-Boot or ASP.NET so my team can easily pick it up in the "snuxoll gets hit by a bus" scenario.
- viraptor 10y agoAgree. A few months ago I stopped supporting py2 in anything I'm writing. Maybe it happens to work. It shouldn't be hard to port if there's a need for it. But nobody complained yet.
- lisper 10y ago> The strings in Python 3 are very difficult to use for beginners. In an attempt to make their strings more "international" they turned them into difficult to use types with poor error messages. Every time you attempt to deal with characters in your programs you'll have to understand the difference between byte sequences and Unicode strings. The author has this exactly backwards. It is Python2 that makes the weird distinction between the string and the unicode type. Strings (and bytes) in Python3 are done (almost) right. (I say "almost" because Python bytes are constrained to be 8-bits wide, but that is not a serious problem.) He also clearly doesn't understand Turing-completeness.
- joatmon-snoo 10y agoAs someone who's used Python 2 for the past half decade and started using Python 3 only recently, 100% with you on this. The first time I was working on a project which required me to be able to work with characters beyond ASCII, I was so confused. To this date, I'm still not sure if I can actually explain what str.encode and str.decode do in Python 2. Admittedly I've never used Python 3 for a project where I had to deal with international charsets - and his point about the concatenation of unicode and bytearrays certainly seems a valid point - but it still seems infinitely better than what Python 2 did.
- kqr 10y ago> his point about the concatenation of unicode and bytearrays certainly seems a valid point This is one of those subjects where I feel like being a non-English programmer has given me surprisingly valuable experience. The operation of concatenating a text value (string) and binary data (byte array) simply does not make sense, for two reasons. What do you expect the result to be? 1. Binary data with the text appended. Then you need to specify which encoding you want the text to have. Once you do (a.encode('utf-8')), all will be fine. You could argue that a conversion to utf-8 should be implicit since that's almost always the correct choice, but you'd be surprised how fast you run into trouble with other systems. 2. Text with the binary data appended after interpreting it as text. Again, which encoding? You'll get very confusing and terrible results if you do not specify this. If you specify this (b.decode('utf-8')) everything will be fine. The only other alternative I accept is a type error. I'm guessing zed would be even angrier if that was the case. I'm not quite sure what Python 3 does, but at least it somewhat communicates that whatever interpretation it does is internal and arbitrary. The Python 2 result is ridiculous.
- mazelife 10y agoThis has to be the ne plus ultra of Python scaremongering. It describes some sort of bizzaro world of a doomed language which it populates with Machiavellian Python maintainers, brainwashed developers, and a small group of heroic holdouts who see resisting Python 3 as a moral imperative. Apparently having too many string formatting options is a moral issue (three, to be specific). As someone who writes a _lot_ of Python code (mostly in 3 but with occasional switches to 2), who maintains several libraries which work in both 2 and 3, and as someone who uses a wide range of libraries in stats, machine learning, networking, web development, etc. in my python 3 work...this piece seems totally disconnected from reality. The problems it describes are relentlessly overblown when they're not simply manufactured from whole cloth. Put another way: the differences between 2 and 3 are not great, the vast majority of libraries you'd want to use (i.e. are actively maintained or of at least good quality) work in 3, and while I don't doubt there's great piles of Python 2 code moldering away big "enterprise" apps and those sorts of places, it's ever been thus in that space, no matter what the language, and doesn't pose any sort of existential threat to Python. (edit: I used to recommend "Learn Python The Hard Way" to newcomers, and have just kept reflexively doing that over the years because I wasn't aware of a better resource. But if this article has accomplished one thing, it's that it's spurred me to look for a replacement)
- elizabethab 10y agoIf you're looking for a new tutorial for beginners, I really liked "Dive Into Python 3" (http://www.diveintopython3.net/ http://www.diveintopython3.net/) and have had some success giving that link to new coders.
- ronreiter 10y agoI think we should instate a fake news policy in HN just like Facebook. Deceiving articles like this should be banned. I mean, what's up with the Turing completeness? Someone needs to give this guy a wake up call.
- jvoorhis 10y agoAw c'mon, Zed. Python 3 is what I've prefer to put into production, it's also going to get the most love from the community.
- ageofwant 10y agoNow that was a 5 minutes of my life I'll never get back. The author commits all the crimes of "propaganda" and "FUD" he accuses others of. The primary and possibly only reason Python 3 has not taken off as much as some would like is because 2.7 is that good.
- lkrubner 10y agoThis perhaps indicates a new level of maturity on the part of the author? I'm almost sad that this essay lacks words such as "fk" and "st". The title would have been more interesting if it had been "Python 3 is a ghetto". I was waiting for the part where he wrote "Ever since then Guido Van Rossum's been a mouthy little shit with nothing to back it up." And I very much wanted to read the part where he challenges Rossum to a fight. And yet, this essay is much more solid than some of the older essays. Less entertaining, but much more solid. And I found myself agreeing with this one.
- esaym 10y agoI was procrastinating this evening on some python 3 coding. This article is just what I needed to get motivated.
- deleted 10y ago[deleted]
- rdtsc 10y agoAfter careful statistical analysis I concluded that there is a 9.56% chance Zed is trolling experienced programmers. Disregarding the trolling about "Turing Completeness", there are some points he raises that are interesting. On some (most thing) items there, the train has left the station. But some are good to listen to: Better error messages. Rust has been making progress there so maybe a good place for inspiration. Error codes and links to additional info online has been done (maybe overdone) but I think there is room for more variable names, more info about the context ("looks like you're trying to do X, maybe Y might be better here..." kinda thing). On the lack of typing and such, MyPy might be a good project to focus on. Standard library updates would be good, but they are tricky. Wouldn't be nice to have requests in the main library? Yes, but changes are still made to it, it might not be updated for a long time then. As they say modules go to the standard library to die. Things I'd like to see: better performance (close working with Pyston or PyPy) and better packaging. On packaging there was talk of Pipfile just today. That was a good start. I've been using Python for many years, and I still don't know off the top of my head the basic pip flags and options, or how to start the venv, what goes into setup.py vs goes in requirements.txt vs goes in setup.cfg. The story got better in recent few years, but there is more room for improvement there I think. I often end up with a build.sh script or run.sh which just does the building and venv-ing and such. Can that be done by default? For usability sake? Even if it is not super-consistent and doesn't work for 1% of use cases... Probably.
- mattip 10y agoPackaging and the distribution network to go with it PyPI are one of the key underpinnings of the python community, and as such deserve more love from the PSF. It is in the best interest of the PSF to actively support and push improvements to packaging, and to put community resources towards its development.
- paddyoloughlin 10y ago> Wouldn't be nice to have requests in the main library? Yes, but changes are still made to it, it might not be updated for a long time then. As they say modules go to the standard library to die. In fact, the plan is for there to be no further new features to requests: http://docs.python-requests.org/en/master/dev/todo/#feature-freeze http://docs.python-requests.org/en/master/dev/todo/#feature-...
- noobermin 10y agoAm I the only one who thinks it's possible this is a parody?
- AstralStorm 10y agoA good enough parody is indistinguishable from extremism. Poe's law.
- psyklic 10y agoAs part of a data science/machine learning course, I have taught many, many beginning students how to use Python 2 and (starting a year ago) Python 3. The reality is that given what beginning programmers learn, they hardly notice the difference between them. Adding parentheses to print() and some explicit conversions to lists are all that is necessary to convert most code that beginners see. The last I looked at Zed's book, the same is true for his coding examples. Overall, I believe for newcomers it is more useful to learn Python 3. Given this background, no employer would reasonably believe you cannot learn Python 2 quickly. They will likely even be impressed you are future-proofed.
- nerdwaller 10y agoWith all the talk about how the Python group is promoting 3 for its own benefit, I'm curious if in the next few weeks we will see the author's agenda change to "Learn !python the hard way"...
- OriginalPenguin 10y agoExcept of course Python 3 isn't killing Python at all. Just taking a look at the TIOBE, in July 2016 it hit #4, it's highest spot ever.
- analog31 10y agoI've helped a few people learn Python. Nobody has ever gotten hung up on Unicode strings. We've even done string-y stuff such as talking to hardware via pySerial. We've modified a couple of libraries ourselves, typically stuff that was written a long time ago and abandoned. Other than that, we've never really run into a problem where the choice of one version of Python over the other was an obstacle.
- hartator 10y agoI hope we can just call Python 2.8 -> Python 4 and do a bridge to import the good things about Python 3. Agreeing or not agreeing with the author points is irrelevant, Python is slowly and unfortunately dying because of this schism.
- AstralStorm 10y agoNever. Python 4 would be another breaking change that is not a step back. Not over BDFL's dead body will this happen.
- Grue3 10y agoHe works at Dropbox, who use Python 2. Having experienced the pains of transition himself, he might yet see the light.
- deleted 10y ago[deleted]
- milesf 10y agoAnyone here remember "Rails is a Ghetto"? http://web.archive.org/web/20080103072111/http://www.zedshaw.com/rants/rails_is_a_ghetto.html http://web.archive.org/web/20080103072111/http://www.zedshaw... Zed's Rails article did lead to some improvements in the Ruby community (eg: The 'pickaxe' had meta-programming added to the next version). Zed likes to stir things up, but rather than dismiss him completely over some nit picky issues, eat the meat and spit out the bones. To the "I stopped there" folks in this thread: why do you think Python 3 is still seeing such poor adoption?
- rtpg 10y agoPython3 is seeing poor adoption because for 5 years it was extremely hard to port existing code to Python 3. But there's been a lot of effort to fix this, and now the tools are in place to make porting easier. Since those tools are in place, pretty much every major Python lib has Python3 support. Many minor libs as well, though it's easy to have one or two dependencies missing it if your project is big enough. Application developers (overwhelming majority of Python users) had to wait for the libraries to get over to Python 3. This has basically happened, so a lot of application developers are now porting. Python 3's rollout was awfully managed, but the community has learned its lesson, and is working hard to fix things. ---- Another issue with this article is that its recommendations simply won't work. - If you try to make "text + bytes" work, you are letting people write code that will fail. You can't implicitly convert bytes to text. You have to know the encoding! Python 2's mechanism (system locale-implicit conversion) guarantees bugs in situations with multiple encodings floating about. - Running Python 2 libs in Python 3 would mean that "text + bytes" style failures in the Python 2 code would bubble into Python 3, destroying all assurances you're supposed to have in Python 3.
- saurik 10y ago> Application developers (overwhelming majority of Python users) had to wait for the libraries to get over to Python 3. And, in the mean time, they were stuck with a language ecosystem which entirely stagnated; while there are some benefits to working with a "stale" language, this was even worse: it isn't like "the C language is no longer going to change, but gcc gets better every year, with better error messages and faster compilation and improved code generation", but "the developers of Python have decided to spend years working on something which you can't port to yet because you are blocked on libraries and libraries are blocked on tooling and language fixes, and in the mean time have gotten pretty damned hostile towards users of Python 2 and constantly claim that whatever the most recent release of 2.7 is is going to be the last one ever so people had better start moving"... and a lot of the people I knew who had been using Python have thereby moved alright, but they moved to Go, Rust, Clojure, or Elixir, and they aren't coming back to Python given that the language is really only slightly better than it was five years ago while these other languages have been going in really interesting places. And yes: there are some people using Python 3 now, but interestingly it seems to be an entirely different group of people, such as data scientists, than the people who were using Python 2: when was the last time you heard about a big website being developed using Python? You don't: that era ended when Python 3000 was announced.
- peterkelly 10y agoThe author completely misunderstands the following: - The concept of Turing completeness - What static typing is - Why strings are not the same thing as byte arrays - That the distinction between strings/bytes is a fix for a problem exists with Python 2, not something that's "broken" in Python 3. I understand why people might still use Python 2 if they have a legacy codebase to maintain, or need certain libraries that for whatever reason have not yet been ported to Python 3. However, if you're just beginning Python programming, or starting a completely new project in the language then none of that matters - you might as well just start with latest version. The one point he gets right is that they should have maintained backwards compatibility by allowing Python 2 modules to run on the Python 3 VM. That was a major fuckup, the implications of which should be a lesson to every language designer of what to never do. It's sad to see the developers of Angular make essentially the same mistake.
- AstralStorm 10y agoThis kind of compatibility is what stifles Java and C# to virtually death. Plus native code depends on particulars of CPython VM quite often.
- politician 10y agoIs this satire?
- Falkon1313 10y agoA lot of people seem to be confused by his Turing completeness argument. I think it's misleading and the phrase 'Turing complete' is a red herring. My guess is that what he was getting at was that other languages use 'compiler-mode' switches for compatibility-breaking upgrades so that you can use older code with newer code. For example, you can write a program in the latest dialect of Free Pascal that includes a unit written in a 30 year old Turbo Pascal dialect and another unit written in a late-90s Delphi dialect. Even Javascript has `"use strict";` and PHP has `declare(strict_types=1);`. Python's solution was instead to say "Just go rewrite all the code you've ever written." That said, claiming that the language isn't Turing complete because it doesn't include switches for compatibility is a bit of a stretch.
- AstralStorm 10y agoThere was no way to keep the compatibility given the string change anyway, as the literal is changed. Port to Python 3 is almost never a rewrite.
- pwdisswordfish 10y agofrom __future__ import unicode_literals, print_function, division, absolute_import
- sqldba 10y agoFrankly the article is whiney and doesn't provide much of a case except, "I don't like it, and strings are bad."
- Animats 10y agoAs someone who has been extremely critical of the Python 3 debacle, even I think this is overdone. Yes, the transition was totally botched, and 8 years in, Python 3 still has less production usage than Python 3. But by now, at least, enough libraries have been ported or replaced that you can actually use Python 3. This was not true three years ago. Porting remains painful. I ported a medium-sized web backend system about two years ago. I found lots of bugs which should have been found and fixed long before, indicating that some standard packages were not being used much. As for "Machiavellian Python maintainers", that's real. There have been explicit attempts to apply pain to Python 2.7 users. This has decreased since von Rossum got stuck maintaining Python 2.7 code at Dropbox as his day job.
- paddyoloughlin 10y agoCould you share any links that show "There have been explicit attempts to apply pain to Python 2.7 users"? I don't think you are lying, but it seems extraordinary to me, so I'm interested in seeing some context and I'm not sure how to find it.
- hobarrera 10y agoFUD, really: > This document serves as a collection of reasons why beginners should avoid Python 3 > The Most Important Reason Aledged 30% adoption. No sources for this really, just a number out of the blue. In me experience, most companies have migrated their internal software to python3, or are doing so. A great deal of desktop apps are already there too. > You Should Be Able to Run 2 and 3 Like so many other languages/libraries, a major breaks compatibility. But hey, guess what? Python actually allows you to install and run python2 and python3 at the same time - most distros actually do this! > No Working Translator Newbies have no legacy codebase no migrate. This is really off-topic. New devs can use code that is compatible with both, or just plain python3 > Difficult To Use Strings Only if you're coming from python2, but definitely not for new users, who have no background as to "how it was before". I got bored of refuting the invalid points by this, but none of them have any validity, especially for beginners. Also, I work at a university where we teach python to new students. They've generally had a much easier time learning algorithms and THEM migrating to C in the second semester (and actually tend to understand everything clearer) than using C as a starter. I've also never seen any of the above mentioned items being an issue.
- obeleh 10y agoThis must be a serious attempt to troll the interwebs. https://meta.wikimedia.org/wiki/Cunningham's_Law https://meta.wikimedia.org/wiki/Cunningham's_Law "the best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer." This REEKS of wrong answers. Turing completeness? Py3 in Py2? The argument that bytes are to confusing?
- kpil 10y agoThe "unicode" string changes in python 3 is enough for me to avoid it, as they somehow managed to go from broken to brain dead. Mandatory utf-8 strings would had been a reasonably nice solution I think.
- tharibo 10y agoThis article was written in the mental state of hate. The author may well reread it, and remove all the hate. He can have the opinion that Python3 is not suited for teaching where Python2 is, but his arguments are in fact just opinions. Another problem in the tone: no respect for his readers. "if *I* struggle to use Python's strings then you don't have a chance."
- emodendroket 10y agoIf you're at the level where you want to use "the hard way" stuff to learn to program he might have a point.
- meitham 10y agoMuch unjustified criticism from a ruby developer! I must say I'm surprised there aren't any swear words in the essay, well done Zed.
- deleted 10y ago[deleted]
- k_bx 10y ago> Python 3 Is Not Turing Complete This is very funny.
- upofadown 10y ago>There is a high probability that Python 3 is such a failure it will kill Python. This seems unlikely. Python 2 is a very popular language. There is currently more than one implementation. So no matter how weird the Python 3 thing gets, Python 2 should be available in some form. Python 3 is actually helping Python 2 here. It attracts those who want to do cool new language things, leaving Python 2 as a stable target.
- nailer 10y ago[Re-posting as a top level comment as I don't want to give the comment I'm replying to any more attention.] >> Currently you cannot run Python 2 inside the Python 3 virtual machine. Since I cannot, that means Python 3 is not Turing Complete and should not be used by anyone. > I stopped there. The author is - quite obviously - staying the Python 3 VM should run Python 2 code, in the same way the JVM and CLR run other languages. That the Python 3 VM doesn't run Python 2 code - and that the Python maintainers apparently say it can't - means the Python 3 VM isn't Turing complete. This is nonsense obviously, but it's a way of pointing out that the claim that the Python 3 VM can't be made to run Python 2 code is also nonsense. This is very, very obvious. Yet HN have gone nuts and rather than discussing the points brought up - why doesn't the Python 3 VM run Python 2 code? - you instead make the laughable claim that the author doesn't know what Turing completeness is. The author even explicitly states they've already created a Python 3 version of their work and HN accuses the author of ulterior motives: "having an out of date work". It's like HN have gone out of their way to cut out quotes from the article and not actually bother to read it. The author is a better programmer I am and also than most in the thread. They're also over the programming mob mentality that sometimes appears on HN and I can very much see why in the responses to this articles.
- MereInterest 10y agoI would say that the incompatibility is exactly what makes python 3 be python 3. If it could run python 2 bytecode, then it would allow the same ambiguity between strings and binary data as is allowed in Python 2. One of the main goals of Python 3 was to remove this ambiguity, by introducing "str" and "bytes" as separate classes.
- threatofrain 10y agoI took the time to read what Zed Shaw had to say, and I think that Zed is a bad journalist or public communicator, and the reaction on Hacker News is symptomatic of this. Zed Shaw had a straightforward (but probably wrong) case to make about Python 2to3, but instead he lacked the restraint from shooting himself in the face. To be clear, Turing completeness is Zed Shaw's baseless launching point for discussing the incompetence or political nefariousness of the Python language devs. Turing completeness does not mean a perfect translation between all languages exists. Genuine ambiguity can exist. If your language goes from 1 to 2 types, a perfect solution may be <permanently> out of the question.
- brownbat 10y agoTreehouse has the opposite view for beginners: http://blog.teamtreehouse.com/python-2-vs-python-3 http://blog.teamtreehouse.com/python-2-vs-python-3 Go figure. It's an enduring debate with strong opinions on opposing sides. The whole topic feels a little flame-baity to me.
- Upvoter33 10y agosimple solution: there are two different languages that are pretty similar so let's just call them different names. suggestions? maybe python for v2 and some other snake name or python relative for v3?
- stillsut 10y agoRemember the author is talking about helping beginners learn programming. Not you, HN user with 10,000 karma, and maintainer of five python projects. There's a case study in the Christensen's Innovator's Dilemma where a company tries to improve its milk shake by making it more chocolaty, by putting whipped cream on top, etc but for some reason this doesn't increase sales. Then some guy goes into the restaurant to figure out “What job do people hire a milkshake to do for them?” and it turns out its not the job the people making the milk shake thought[0]. I wish the core python developers would do the same and ask themselves not how to make the best milkshake, but why do people buy their milkshake in the first place? [0]: http://www.itsma.com/a-better-way-to-segment/ http://www.itsma.com/a-better-way-to-segment/
- failedxyz 10y ago"Currently you cannot run Python 2 inside the Python 3 virtual machine." does this mean he tried to run python 2 using the python 3 interpreter? no shit it doesn't work ._. that's not how turing machines work
- rbanffy 10y agoI remember having predicted something like this when he started cozying up with the Python community... Python 3 is a ghetto...
- asah 10y agoThis is so filled with #fakenews it's perhaps easier to pick out the one useful criticism, which is having to learn 3 string formatting styles, which is indeed a pain. For commercial work it seems wise to stdize on one in a given project/organization. As for the rest, I'll pile on: - python3 is eight years old, not decades, and this matters: Perl4 => 5 was a similarly long transition and for similar reasons. - python3 is obviously Turing complete. Moreover, I'm not sure its lack of whatever the author thinks TC means, actually matters in the question of whether python3 is worth choosing to learn or build systems. - very few languages can be used "side by side" with each other, and I want aware that this was a common use case. If you have python2 code, there are various ways to invoke it without porting, eg subprocess, web service, etc. Obviously, there's various costs eg performance, system mgmt, debugging, etc. - high probability of failure? Strange but I see the exact opposite, with more and more projects more supporting ONLY python3 ie the tide is turning. Anyway, this is scaremongering and #fakenews so YMMV.