TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Google will kill Python 3, and it might be a good thing

25 点作者 mk44大约 8 年前
We know that there are issues with the Python echosystem at large [1]. Google is heavily invested in Python 2, and thus created Grumpy [2], which is a new Python 2 runtime, in Golang. A company like Google, stepping in, will inevitable lead to the sorting out of many of the issues [1], and introduce new developments for Python 2. The Golang backend of Python will enable the development of many benefits we see in Golang (built in concurrency?, speed?, easy package management?) This would mean that the community will gravitate towards python 2. What do you think?<p>[1] * Fragmentation of package managers: Pip, Conda, etc.. * Fragmentation of runtime: Pypy, CPython, Jython, Cython, etc.. * Golang (and probably Grumpy in the future) doesn&#x27;t suffer from these issues, because a central entity (Google) is leading it.<p>[2] https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;grumpy

16 条评论

yladiz大约 8 年前
Google isn&#x27;t going to &quot;kill&quot; Python 3. This is a relatively niche use case (grumpy only converts Python 2.7 code into Go code, and it&#x27;s not 1:1 as it&#x27;s missing features like decorators), and there doesn&#x27;t seem to be any intention on adding new Python features into grumpy. My guess is that this was made more for Google&#x27;s purposes of migrating some of their legacy Python 2.7 code to Go, in an effort to move towards Go internally. It also doesn&#x27;t run Python code directly, it trans-compiles Python to Go code, which wouldn&#x27;t work for some workflows. For this to have any possibility of becoming another Python runtime, it would at the very minimum have to support every feature or have a real reason to not support the specific feature in Python 2.7.<p>The other thing, arguably more important, is that there isn&#x27;t really a community around grumpy, whereas there is around Python 3 (the latest nontrivial commit was 3 weeks ago for grumpy, whereas the latest nontrivial commit was 6 hours ago for Python). Even if Google did try to build a community, many people worry that Google will just abandon software when they want to, so people would be hesitant to work with this software long term, which means developers wouldn&#x27;t want to build any software for it; the majority of developers developing new Python code are doing it in Python 3, and those that aren&#x27;t are most likely using six rather than only 2.7 unless they&#x27;re supporting a legacy codebase that either they don&#x27;t want to or cannot upgrade to Python 3 or to upgrade using the six library.<p>Python 3 may, however unlikely, &quot;die&quot;, but this and Google won&#x27;t be the death of it.
评论 #13852214 未加载
评论 #13854436 未加载
softinio大约 8 年前
i totally disagree with your view. Python 3 of today is fantastic and the community is fully behind it.<p>Yes there will be legacy code that will remain on python2 for ever, but this is normal.<p>I am personally loving the new features of python 3.6 in particular and would not want to look back.<p>Google has a lot of code in python2 they want to move to go. It would be bizarre to see anyone start a new project in python 2 because of grumpy.<p>Love the python community. The future is python3. Enjoy!
评论 #13852258 未加载
评论 #13860400 未加载
upofadown大约 8 年前
This seems to be based on the false Python 3&#x2F;2 dichotomy.<p>Python 3 is popular enough that it is effectively unkillable. For exactly the same reason Python 2 is also unkillable.<p>Language adoption is never a zero sum game.
drallison大约 8 年前
I think the choice of title for HN is unfortunate: it implies (for me) some inside knowledge about what is (or will) happen to Python. Casual HN readers will see the death of Python as a done deal, whereas the truth is &quot;the reports of [Python&#x27;s death] are much exaggerated&quot;.
wooptoo大约 8 年前
Not true at all. Python3 evolved in leaps and bounds in the last few years gaining many essential features for a modern programming language. Things like async&#x2F;await, new frameworks showing up all the time shows a growing ecosystem. The fact that Google prefers Go is understandable and does not mean that python&#x27;s importance is diminished in any way.
otakucode大约 8 年前
Ha, no. Google can continue toiling away in the caves of antiquarian history if they like, but anyone with half a brain will be using Python 3. All the things mentioned, built in concurrency, speed, easy package management, are all in Python 3. I have no idea why Google doubled down on Python 2.7 years ago. I mean, generally they are competent technical folks. But 2.7 is littered with all kinds of obtuse mis-steps in the development of the language. And it&#x27;s missed out on the last several years of feature addition to Python 3 (asynchronous primitives among other things). Why would one plant their flag in something like that? And I mean come on... print as a keyword? How can anyone not spit at that?
scrame大约 8 年前
This reminds me of an old question on reddit after their HPHP compiler was announced and someone said asked if it was going to take erlangs role.<p>The answer is no, purpose built runtimes do not uproot established projects in another domain, and a proprietary corporate project to migrate legacy code will not fix issues of fragmentation. In fact, it just kinda piles it on.<p>If you want to see how effective Google has been in fixing long standing python issues, check out the history of the Unladen Swallow project.
eevee大约 8 年前
It&#x27;s bad that the runtime is fragmented. Google will fix it by creating a new runtime
git-pull大约 8 年前
(One topic I see being brought up when it comes to runtimes, python 2 and 3 is C API stuff. It still bubbles up to the top now and then. This isn&#x27;t related to grumpy specifically, but the FUD I&#x27;ve been witnessing)<p>Maybe I&#x27;m far underestimating the amount of custom C API being used in production at places or been hanging out in the wrong places. I just doubt that intention is to kill off anything. Even by unintended side effect.<p>A great deal of the python code I see with C extensions already is Python 3 compatible and even has wheels for them. I think it used to be numpy and libraries that pulled it in as a dependency. We&#x27;re at the point where compatibility from 2 and 3 is so darn good in libraries we pull in I hardly notice it anymore. [1]<p>I do write Python 2 + 3 compatible code. The differences in the syntax itself are trivial. A compat module [2] will do the trick assuming you have your own custom C extensions, which most don&#x27;t.<p>(Going off on a bit of a tangent) There has been some deliberation of what has to be done to get around GIL: The other thing is I haven&#x27;t been convinced of is the idea being thrown around at conferences and on mailing lists that breaking the C API is this world-ending scenario. Yeah I understand the disruption, but what % of the code, assuming you&#x27;re in the minority of python developers doing custom c extensions, that you can&#x27;t update some API signatures?<p>[1] <a href="https:&#x2F;&#x2F;python3wos.appspot.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;python3wos.appspot.com&#x2F;</a><p>[2] <a href="http:&#x2F;&#x2F;lucumr.pocoo.org&#x2F;2013&#x2F;5&#x2F;21&#x2F;porting-to-python-3-redux&#x2F;#write-a-compatibility-module" rel="nofollow">http:&#x2F;&#x2F;lucumr.pocoo.org&#x2F;2013&#x2F;5&#x2F;21&#x2F;porting-to-python-3-redux&#x2F;...</a>
tedmiston大约 8 年前
I think the argument for runtime fragmentation and package fragmentation is a bit exaggerated. Most people use pip. Most people use CPython. People make tradeoffs when they need to use another interpreter for performance reasons [1], but CPython is <i>the</i> reference implementation. Just because alternative options exist for specific cases doesn&#x27;t mean there&#x27;s fragmentation in the ecosystem at large.<p>[1]: <a href="http:&#x2F;&#x2F;docs.python-guide.org&#x2F;en&#x2F;latest&#x2F;starting&#x2F;which-python&#x2F;" rel="nofollow">http:&#x2F;&#x2F;docs.python-guide.org&#x2F;en&#x2F;latest&#x2F;starting&#x2F;which-python...</a>
jchassoul大约 8 年前
this is all about confusion and fud, not grumpy of course, the way it&#x27;s presented in this thread, sucks to be a n00b in 2017.
akoster大约 8 年前
This is another python 2 fork that reading this reminded me of: <a href="https:&#x2F;&#x2F;github.com&#x2F;naftaliharris&#x2F;tauthon" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;naftaliharris&#x2F;tauthon</a>
Eridrus大约 8 年前
Python&#x27;s primary value is the ecosystem. With a general agreement to move to Python3, Google would just be handicapping themselves. An interoperable Py2&#x2F;3 interpreter seems more likely.
vgy7ujm大约 8 年前
Better come over to Perl before it&#x27;s to late guys ;)
lcnmrn大约 8 年前
How do you explain the fact TensorFlow targets Python 3 for speed, features, etc.?
评论 #13851274 未加载
评论 #13854489 未加载
codeonfire大约 8 年前
Google culture is all about arrogance and elitism. Their coder&#x2F;snobs are definitely not pro python any version. They have their own internally developed ivory tower languages with horrible tooling and features to champion.