[Python-ideas] from __past__ import division, str, etc
Chris Angelico
rosuav at gmail.com
Thu Jan 9 00:54:23 CET 2014
On Thu, Jan 9, 2014 at 10:34 AM, Alejandro López Correa <alc at spika.net> wrote:
> 2014/1/8 Steven D'Aprano <steve at pearwood.info>:
>> About 70% of the top 200 projects on PyPI support Python 3, and
>> downloads of Python 3 are very healthy, possibly even higher than
>> downloads of Python 2.
>
> I do not think that one is a particularly good metric. For each
> project hosted at PyPI how many are not there? People have personal
> projects, companies have internal software, and there are products
> that contain at least some python and are targeted at final customers,
> like games or Maya.
But what IS a good metric? How are you going to measure any of that?
It's better to at least use PyPI stats than to pull numbers out of a
hat.
>>> and minimise the risk of defection to other languages.
>>
>> People threaten that, but it is an irrational threat. (Mind you, people
>> do silly, irrational things every day.) If you think its hard to migrate
>> from Python 2 to 3, when you get to keep 90% of your code base and most
>> of the backward-incompatible changes are a few libraries that have been
>> renamed and a handful of syntax changes, how hard will it be to throw
>> away 100% of your code and start again with a completely different
>> language?
>
> I think human psychology works like that. Many people may delay the
> acquisition of a new car, but once they are committed to buy a new one
> they want the best they can afford (within their budget). Some
> languages may gain momentum and gain the "cool" vibe. We saw the rise
> of Ruby a while ago, and maybe a language that handles well multiple
> cores could be a strong temptation in the future. If people keep
> investing in python, small bits at a time, keeping their codebase
> always up to date, it is more difficult, IMHO, to commit to a full
> rewrite.
Maybe. But how much temptation would it need to be to induce a
complete rewrite? (Mind you, it's not always a *complete* rewrite.
I've been "porting" code from Win32 C++ to GTK Pike, and in the
process usually shortened it by 50% or better, but mostly what I'm
doing is reading the old code, taking maybe a few bits of it that are
so simple they'd be the same in nearly any language, and
reimplementing the original logic.) The expanded gap between Python
2.7 and Python 3.7 is mainly going to be features of 3.7 that you
could choose to use now that you've ported, rather than mandatory
changes. Python doesn't arbitrarily drop features or break stuff in
minor releases. That means the gap between 2.7 and 3.7 will still be
far FAR narrower than the gap between Python and Ruby - so,
correspondingly, the temptation to switch to Ruby would have to be
really strong. In the porting case I mentioned a moment ago, there
really was a very strong temptation (using Win32 APIs meant I was
bound to Windows (though Wine is a wonderful thing), and the C++ code
was going through stupid levels of overhead to manage memory and
such), so it was worth switching. I was NOT able to convince my boss
to switch our web site from PHP into Python, because he just couldn't
see enough benefit from changing language - but moving to a new PHP
was a much lower hump to get over. (Only a few things needed
changing.)
ChrisA
More information about the Python-ideas
mailing list