Live data from Hacker News

The Case Against Python 3

learnpythonthehardway.org

91–100 of 281 posts

Re: The Case Against Python 3

#91
Now 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.

Re: The Case Against Python 3

#92
post #4
post #2

> 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.

I came here to post this. What?

I 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.

Re: The Case Against Python 3

#93
post #67

> 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 di…

As 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.

Re: The Case Against Python 3

#94

The 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 branc…

A language must change, or it will be left behind, and become an esoteric toy. Even C has to deal with this. The only reason C is still popular is because of it's grandfathered status in so much of our infrastructure, and in many of the popular OS choices.

A language that changes will alienate people, and lose people. Perl saw this. Python is seeing this. The way to guard against this is to keep backwards compatibility. That generally doesn't allow enough change in languages that provide enough constraints to make them popular for large engineering projects, whether open source or commercial. Lisp doesn't need to change much, it's malleable enough in many respects that you can implement whatever you need, but good luck getting large engineering projects done and maintained using it. Perl has the same problem.

The only solution I see to stay relevant is to allow alienating users, but make sure those changes that alienate users are good enough to draw substitutes, enough to keep steady state, or preferably still grow slowly. Maybe prior users will even swing back in occasionally, and without the false sense of betrayal, they'll actually find they like the state of the language a few years later. For a while, at least.

This seems like the end of the world to Python community members, and it seemed like the end of the world to Perl community members because of the prior status those languages held, where they are or were at the top of their respective niches. I doubt the Scala community worries about exactly the same things.

Put another way, did you expect to still be writing Python the same way in 20 years, with only the popular libraries changed? If you did, did you think about what that would mean for the language, and what the community would look like at that time? I'll tell you. Perl. That's not necessarily a bad thing. I write Perl professionally, every day. I love it. It's not the worst thing, being stable and reliable. But you don't get to be top language in your niche and sit on your laurels at the same time.

Change is good. Embrace the change. If you're lucky, you'll use many languages to program in your life and be happy. The only way I see anyone being happy using any single language forever is to bury their head in the sand and ignore everything else going on around them.

Re: The Case Against Python 3

#95
post #62

I run 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 ). * 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 abili…

Definitely 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.

Re: The Case Against Python 3

#96

The 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 branc…

I don't really hear that many complaints from the C++ community about what you're talking about. All those older libraries that pre-date C++11 still work fine and interoperate with no difficulties with even C++1z libraries. C++ is the language that has done feature adoption correctly in my opinion. Standardized, by committee, with forwards and backwards compatibility in mind.

I'm with you. I like some of the changes in the C++ language. But I don't love the C++ 3rd-party ecosystem. Python's is very healthy.

C++ is so unconcerned with modules they've been kicking the feature down the road spec by spec. I think it's now 'post-17'. (could be wrong).

Rust is a language that's in the perf class of c++ but has built-in lifetime support and built in modules. It's ten times easier to do database or, say, SDL interaction in rust. And rust is barely 1.0!

I don't know anyone who programs who doesn't use a ton of libraries. C++ just hasn't prioritized this part of programming.

Re: The Case Against Python 3

#97
post #44

One 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…

Naw, `zip` is a builtin in py2. You might be thinking of `itertools.izip`? https://repl.it/E5v6/2

zip 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

Re: The Case Against Python 3

#98
post #25

> 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 fo…

I 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

Re: The Case Against Python 3

#99
post #5

On 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?

Well, it seems to me like that's the whole "may kill Python" thing he's talking about.

I 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.

Re: The Case Against Python 3

#100

Zed just needs to be at war with something.

The 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."

I mean, his original unhinged rant[0] was 9 years ago now.

[0] 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."

Post reply on HN