5 ms·
> That "learn python the hard way" guy says don't use python 3 They are wrong. There is no good reason to start with Python 2 for new projects. The reasons peo
by outworlder 8y ago
> That "learn python the hard way" guy says don't use python 3
They are wrong. There is no good reason to start with Python 2 for new projects. The reasons people stay on 2.x are institutional inertia and legacy code. A hello world program has none of these problems.
- eesmith 8y agoThe previous poster should have written "said" not "says". If you look at https://www.learnpythonthehardway.org/ https://www.learnpythonthehardway.org/ you'll see the first paragraph starts "Newly updated for Python 3". The work started around 2 years ago - https://zedshaw.com/2017/04/22/learn-more-python-rough-draft-up/ https://zedshaw.com/2017/04/22/learn-more-python-rough-draft... . Shaw doesn't "agree with the direction of Python 3", and regards it as "being a complete waste of human energy" - https://zedshaw.com/2017/08/26/what-if-it-worked/ https://zedshaw.com/2017/08/26/what-if-it-worked/ . But that's different than saying that new projects, in 2019, should not start in Python 3.
- kalimoxto 8y agoShaw also declared that Python 3 is not Turing complete so I would take his Python 2/3 opinions with a heft grain of sea salt
- eesmith 8y agoCovered in https://learnpythonthehardway.org/book/nopython3.html https://learnpythonthehardway.org/book/nopython3.html . If I understand the trolling logic, "if it's impossible for Python 3 to support Python 2 then Python 3 cannot be Turing complete." This hinges on 'impossible' being used as a technical objection. The argument should be that it's economically infeasible for Python 3 to support Python 2, not that it's technically impossible.
- joshuamorton 8y agoEven then he's wrong. It's perfectly economically feasible to write a python2 interpreter in python3-the-language. Take an rpython based py2 interpreter and make sure the rpython code is py3 compatible. What he suggests is that since the python3 interpreter cannot run python2 code, that somehow this implies that python3 the language is not turing complete. This makes about as much sense as saying that since gcc won't compile my Java code, C++ isn't turing complete. In fact it's the same statement. And there are, in fact, valid reasons why the python3 interpreter cannot run both 2 and 3 code intertwined (mostly because things are ambiguous in such a situation. Does `{}.keys()` return a list or an iterator? How do you decide? Well you need to know if the code you're running is py2 or py3 in advance and you don't. I include his original statement here: [1]. [1]: https://www.reddit.com/r/shittyprogramming/comments/5ejbr9/proof_that_python_3_is_not_turing_complete/ https://www.reddit.com/r/shittyprogramming/comments/5ejbr9/p...
- eesmith 8y agoI made the statement about economically feasible, not Shaw. Based on many readings of the Python developer comments, there wasn't enough people time + money to make that happen for mainline Python, that is, CPython. Your statement is perhaps true about Python-the-language. CPython has additional constraints, including specific details of reference counting and extension APIs, as well as the desires of the current developers. You'll note all the work that PyPy has had to do for that level of compatibility, and it's still not perfect. My comment was with respect to "Shaw also declared". Shaw's posting is, in my reading, obvious mockery and not a declaration of a truly held belief. I don't see how a flamebait posting in a Reddit group titled "shittyprogramming" means much about the contents of his book or the topic of this thread. Isn't there something more substantial about his opinions to criticize?
- joshuamorton 8y ago(his comment was quoted in shitty programming not originally made there. It was originally made in the blog post where NOTE I was trolling now appears, I just found the first quote in shitty programming). My comment has nothing to do with cpython. Python2, the language and Python 3, the language, are ambiguous. The broader context for Shaw's comments were that the py3 interpreter should just transparently run py2 code. Without a flag, that's not possible. Not like hard, or a time investment, or something like that. But truly probably impossible. `print(b'b'=='b')` will give a different result in 2 vs 3. An interpreter can't transparently run both. It needs to know which is which. As to your last question, not really. Very few of his opinions on py3 made any sense to people who were at all informed. The problem was, his audience is uninformed people.
- Alex3917 8y ago> If I understand the trolling logic Zed trolls as a didactic technique. Don't pay attention to what he says, pay attention to what he's actually trying to teach you.
- viraptor 8y agoThis works if you have a small target group which understands it without explanation. Zed writes for the internet. That approach makes him a troll, not a clever teacher.
- newen 8y agoWow, you are completely misinterpreting what he said here. Either that or you're repeating what other idiots on the internet said. Any CS undergrad would understand that he was making a joke when he said that.
- nvr219 8y agohe still recommends starting with python 2
- eesmith 8y agoNot at https://www.learnpythonthehardway.org/ https://www.learnpythonthehardway.org/ . Where are you getting the "still"?