Live data from Hacker News

Python 3 can revive Python

medium.com

131–140 of 242 posts

Re: Python 3 can revive Python

#132
post #115

"Nowadays stuff like proper closures, immutability, a good async story, etc, is considered a necessity by discerning hackers." Python has proper closures; I would hope discerning hackers know the difference between a closure and an anonymous function. asyncio is fantastic. "Remove the GIL." Do you think no one's thought of that before? Remove it how? "Make it speedy." As you note, that's what PyPy is doing, but this…

Regarding speed, my thoughts exactly. I'm a Ruby programmer and I see this being thrown as a weak point of Python/Ruby all the time. I remember the days where Javascript and PHP were supposed to be slow. Now that Facebook/Google/Apple/Mozilla have thrown dozens of millions of dollars in across the board optimizations, they aren't so slow anymore. Not C-fast mind you, but (especially for Javascript), definitely not languages you can call slow anymore.

It's really only a problem of investing enough money for JIT and GC technology that would make any language "fast enough" really.

Re: Python 3 can revive Python

#133
post #79

As far as I am concerned, a mere user, hacking python for 'academic research' in multiple aspects of structural biology and bioinformatics, I have yet to see a single practical argument for switching to or even investing time in learning Python 3 'right now'. Maybe in six years it'll be a different story, but from where I stand, python vs python 3 is a remote and ephemeral distinction, created by the grand poobahs, o…

Why did you bother to learn Python 2? Scientific code typically translates cleanly using 2to3, even. You can get up to speed with all those "terribly complex" changes in Python 3 in about five minutes. Scientific code in particular typically has no advanced unicode handling and no custom CPython extensions, so switching is trivial. I totally agree with you: Py 2 vs 3 is of very little significance to us scientists. W…

> There's nothing to gain by sticking with Python 2

There is a lot more useful code and libraries out there for python 2.

Re: Python 3 can revive Python

#134
post #54
post #49

Python needs to be revived? I always thought of Python as being a great utility programming language. It's not really a specialist, more of a jack of all trades. For example PHP is all about web development. Ruby is probably most well known for Rails and also widely used for web development. Python is widely used for web development, but that's not necessarily the first thing you think of for Python. What's going to…

> I'm always skeptical to hear that a developer has moved from X programming language to Go. I see what you mean. Also, presumably those that didn't switch, that use and love Python, are not very compelled to write a "We are still staying with Python" blog. And I think they should. Marketing and perception is important.

I'm using Python 3.4. All the libraries I need are available, including the world's best database library, SQLAlchemy. It's a more pleasant experience than Python 2.x. And I have the peace of mind knowing that I'm not stuck on a legacy, deprecated platform.

I used to stick up for Python 3 on HN and other places but I've given up. I have no interest in converting people going to Go. And no matter what Python (or any other language) does, they are going to lose users to JavaScript.

Also, my experience is that people who feel passionate about Python 2.x will shout down people who are using Python 3 with "nobody uses Python 3." Who has time for that?

Re: Python 3 can revive Python

#135

One pain point I've really felt recently with Python is in the deploy step. pip installing dependencies with a requirements.txt file seems to be the recommended way, but it's far from easy. Many dependencies (such as PyTables) don't install their own dependencies automatically, so you are left with a fragile one-by-one process for getting library code in place. It was all fine once I got it worked out but it would so…

As several person mentioned already, wheels (http://wheel.readthedocs.org/en/latest/) make deploying much easier (and faster), not needing to get anything from pypi.

Re: Python 3 can revive Python

#136
post #127
post #107

Earlier quoted context omitted.

ECMAScript 6 has generators, and they are already available in Node.js.

Javascript seems to go the opposite way of python: instead of ironing the warts out, it adds them. The DOM-API is nonsensical and ugly? Why not add language features so we can implement it in pure JS? Sounds like a great idea.

How does that relate to ES6 generators?

Re: Python 3 can revive Python

#137
post #18

One pain point I've really felt recently with Python is in the deploy step. pip installing dependencies with a requirements.txt file seems to be the recommended way, but it's far from easy. Many dependencies (such as PyTables) don't install their own dependencies automatically, so you are left with a fragile one-by-one process for getting library code in place. It was all fine once I got it worked out but it would so…

If a package doesn't get all its dependencies installed via pip its because of missing information in the package itself. That's neither a flaw of pip or Python but will cause problems for any package manager. I find the combination of virtual environments and pip very convenient to work with. When I run into trouble with missing dependencies I often find the project on GitHub and can send a pull request. Regarding N…

Not necessarily. pip cannot resolve all dependencies. For example, if a package specifies both numpy and pandas as a requirement, installation will fail. This is because pandas in turn requires numpy, and pip does not resolve the dependencies in a single step, you need to install numpy first and then go on with pandas.

Re: Python 3 can revive Python

#138
post #53
post #39

Earlier quoted context omitted.

Speed is low on my list as to why I prefer Go over Python. (In fact, Go isn't necessarily fast. It's just that Python is unnecessarily slow.) Having a decent type system and decent concurrency primitives are far more attractive.

> It's just that Python is unnecessarily slow. It's not Python that's slow, it's CPython. If you use PyPy you get a much faster implementation of Python, not too far from Go speed.

IHMO, PyPy isn't a strong counter-argument for Python's slowness.

Yes, PyPy is probably faster than CPython. But what then? In most cases, CPython is THE PYTHON. PyPy is still in its early age and has a lot to demonstrate itself as a serious alternative to CPython.

On the other hand, programmer could get out-of-box performance boost from adapting Go without worrying the potential compatibility issues.

PyPy is a very interesting and promising project. I highly respect that. I just don't like the idea of merely using it to dodge the blame of performance slowness, when what people are really talking about is CPython.

Re: Python 3 can revive Python

#139
post #24

That pretty much reiterates my points from last time we discussed (not many hours ago). https://news.ycombinator.com/item?id=7801004 Besides what already was said. It is also important to emphasize that Python 2 is already pretty good. So it is not that Python 3 is bad, it is just that it is very hard to improve on 2. Ironing out the warts is good, but this was not the right time. This should have happened 7-10 years…

I can tell that proper Unicode support is a reason to discounting a language/library if you're not a native English speaker and/or writing programs that have to be localized.

Python was created by a non-native English speaker.

Re: Python 3 can revive Python

#140
post #130

Earlier quoted context omitted.

I'd say people took Python over Perl because of readability, not because of the Perl 6 saga.

If you take the time to learn the language, it's quite readable. I used to know a guy who'd freak out about not being able to read Perl. He couldn't write ("speak") it either, so I'm not sure what he was expecting.

I've met many developers who had never written Python or spent any time learning it, but still found it very readable.
Post reply on HN