Live data from Hacker News

The Case Against Python 3

learnpythonthehardway.org

241–250 of 281 posts

Re: The Case Against Python 3

#241
post #60

Interesting 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!)

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

Re: The Case Against Python 3

#242
Remember 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/

Re: The Case Against Python 3

#243
post #102

Earlier quoted context omitted.

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

Well no. The problem is that py3 breaks backwards compatibility, without really a good reason. What's so much better about it? Why couldn't they sort py2 at least for module imports? Which is exactly opposite for c++11 - it doesn't break backwards compatibility, but I really want those new features. I think if it broke backwards compatibility, I'd still switch to the new c++. At work we use py2 and c++11...

> At work we use py2 and c++11...

As do most corporations. If you want a job in Python, you had best know 2.7.

Re: The Case Against Python 3

#244
post #170
post #102

Earlier quoted context omitted.

Well no. The problem is that py3 breaks backwards compatibility, without really a good reason. What's so much better about it? Why couldn't they sort py2 at least for module imports? Which is exactly opposite for c++11 - it doesn't break backwards compatibility, but I really want those new features. I think if it broke backwards compatibility, I'd still switch to the new c++. At work we use py2 and c++11...

for native unicode support I would break the world.

2.7 does Unicode quite well. Not as well as it should, certainly, but arguably better than 3.3 did. I haven't played with anything since, and given the long history of this project going off the rails, I will require some serious convincing before I waste more time in it.

Yes I do multilingual string processing a LOT. I worked in SMT for about 3 years. Python 2.7 was the only practical option.

Python 3 does not fix the GIL. That would be enough to get me interested again.

Re: The Case Against Python 3

#245

Earlier quoted context omitted.

>I doubt the Scala community worries about exactly the same things. Why do you single out Scala as being particularly different to Python and Perl?

Because Scala isn't nearly as popular as Perl was or Python is. I imagine losing some perceived status is less important to them than just doing the best they can to provide a good product and address people's needs.

Scala work sure pays a heck of a lot better.

Re: The Case Against Python 3

#246
post #117

Earlier quoted context omitted.

He definitely is... I just checked his twitter to make sure I'm right. He's clearly joking. https://mobile.twitter.com/zedshaw

Should be clearly stated on the page. Because Poe's law.

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

Re: The Case Against Python 3

#247
"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

Re: The Case Against Python 3

#248
post #225

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

> 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. There is no "CPython VM": no version of Python guarantees bytecode compatibility between versions. The bytecode is just an optimisation. For a Python interpreter to support both Python 2 and Python 3, it would need to have have some source level way of telling the two apart. Bytec…

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

> No it doesn't.

You do realise the next four words in the post you're replying to is:

> > This is nonsense obviously

?

And then a reason why the claim is being made?

To continue your CPU analogy (I actually read your post), it's like Intel saying x64 can't run x86 binaries, then someone else saying "why not, isn't it turing complete?" as a joke way of pointing out that it should.

It perfectly reasonable to read Zed's post and argue that Python 3 VM should not be able to run Python 2 binaries. But not even bothering to read or comprehend the post (or this thread) and claiming he doesn't understand Turing machines is a waste of everyone's time.

* We know AMD invented x64, and x64 does run x86 binaries, and the IA64/Itanium story, but anyway.

Re: The Case Against Python 3

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

From 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 reall…

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

Re: The Case Against Python 3

#250

Earlier quoted context omitted.

After 8 years the man has a point, most of his arguments are not correct though. Conclusion stands, python is shooting itself in the foot.

I 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 primari…

The vast majority of C# projects are not .NET Core but using the old, backwards-compatible stuff. And it's kind of nice that you can have that huge back catalogue of stuff even as you use the latest C# features.
Post reply on HN