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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Why Python keeps growing, explained

265 点作者 usrme大约 2 年前

50 条评论

CE02大约 2 年前
One thing I’d add to this conversation, though I’m certain it’s already been stated: As many have mentioned, there is a large subset of the user base that uses Python for applied purposes in unrelated fields that couldn’t care less about more granular aspects of optimization. I work as a research assistant for international finance faculty and I would say that compared to the average Hackernews reader, I’m technologically illiterate, but compared to the average 60-80 y&#x2F;o econ&#x2F;finance faculty member, I’m practically a Turing award winner.<p>Most of these applied fields are using Python and R as no more than data gathering tools and fancy calculators. something for which the benefits of other languages are just not justified.<p>The absolute beauty of Python for what I do is that I can write code and hand it off to a first year with a semester of coding experience. Even if they couldn’t write it themselves, they can still understand what it does after a bit of study. Additionally, I can hand it off to 75 year old professors who still sends Fax memos to the federal reserve and they’ll achieve a degree of comprehension.<p>For these reasons, Python, although not perfect, has been so incredibly useful.
评论 #35010475 未加载
评论 #35012623 未加载
评论 #35009811 未加载
评论 #35012315 未加载
评论 #35012749 未加载
评论 #35019361 未加载
评论 #35012852 未加载
评论 #35025329 未加载
评论 #35013373 未加载
评论 #35012090 未加载
pletnes大约 2 年前
Python keeps growing in number of users because it’s easy to get started, has libraries to load basically any data, and to perform any task. It’s frequently the second best language but it’s the second best language for anything.<p>By the time a python programmer has «graduated» to learning a second language, exponential growth has created a bunch of new python programmers, most of which don’t consider themselves programmers.<p>There are more non-programmers in this world, and they don’t care - or know about - concurrency, memory efficiency, L2 cache misses due to pointer chasing. These people all use python. This seems to be a perspective missing from most hackernews discussions, where people work on high performance Big corp big data web scale systems.
评论 #35010305 未加载
评论 #35007323 未加载
评论 #35007748 未加载
评论 #35009126 未加载
评论 #35008639 未加载
评论 #35008877 未加载
评论 #35009166 未加载
评论 #35009036 未加载
评论 #35014443 未加载
评论 #35013312 未加载
评论 #35009925 未加载
评论 #35007252 未加载
arnvald大约 2 年前
I&#x27;m a bit surprised to see this article on GitHub blog, it feels more like something from dev.to - looking at the surface, with little actual insights.<p>Most of the provided reasons behind Python&#x27;s popularity are true also for other languages - portable, open source, productive, big community. This can be also said about PHP, Ruby, or Perl back in 2000s. Why isn&#x27;t Perl as popular as Python?<p>I don&#x27;t think it&#x27;s all about readability or productivity, but about tools that were built over the last 30 years that have been used in academia and now with the boom in ML&#x2F;AI&#x2F;Data Science, they made Python an obvious choice to use for the new generation of tools and applications.<p>Imagine that the boom in ML&#x2F;AI didn&#x27;t happen - would Python be #1 language right now?
评论 #35011069 未加载
评论 #35007567 未加载
评论 #35020590 未加载
评论 #35012397 未加载
milliams大约 2 年前
This was already posted at <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=35000415" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=35000415</a>, I don&#x27;t know why it didn&#x27;t detect the duplicate. I&#x27;ll repost my comment from there:<p>This is a strange article. It&#x27;s got the talking point about Python that we were hearing about 10 years ago - &quot;tired of those pesky curly brackets in Java, try this new language you might not have heard of: Python!&quot;. Who reading the GitHub blog has not heard of Python?<p>Also, that snippet used in the &quot;What is Python commonly used for&quot; section is strange:<p><pre><code> import antigravity def main(): antigravity.fly() if __name__ == &#x27;__main__&#x27;: main() </code></pre> It&#x27;s overly verbosely written (especially given the example just above about how you don&#x27;t need main function in Python) and refers just to an insider joke&#x2F;Easter egg. I can&#x27;t see that it&#x27;s going to convince anyone to try Python, only make them feel that they&#x27;re on the outside of a joke.<p>It then ends with what seems like it might have been the point of the article, an advert for Copilot. It seems the way to get started writing Python is to write a short comment and then spam &lt;TAB&gt; and let the AI auto-complete your project.<p>(Also, and perhaps less importantly, looking at the author&#x27;s GitHub profile I can&#x27;t see a single instance of Python there. Though I&#x27;m not doing a deep-dive as that feel overly picky and there&#x27;s plenty of private contributions that could well be Python.)
评论 #35009953 未加载
评论 #35009672 未加载
评论 #35009146 未加载
评论 #35012316 未加载
评论 #35009937 未加载
评论 #35012791 未加载
评论 #35025527 未加载
评论 #35012733 未加载
评论 #35009212 未加载
评论 #35012118 未加载
qsort大约 2 年前
Eh, they&#x27;re just a lot of ways to say &quot;path dependence&quot;. Scripting languages are basically the same exact technology with respect to each other. In the alternate universe where numpy and scipy are, let&#x27;s say, numruby and sciruby, wouldn&#x27;t we be here asking why Ruby keeps growing?<p>That&#x27;s not a sales pitch for python, it&#x27;s a sales pitch for the concept of a scripting language; it&#x27;s like saying &quot;you should really buy a Ford, it comes with four wheels&quot;.
评论 #35007222 未加载
评论 #35007227 未加载
评论 #35009297 未加载
评论 #35009510 未加载
Lyngbakr大约 2 年前
I think one reason for Python growing popularity is because it&#x27;s become the default tool in some domains whether it is the best tool or not.<p>This week our Director ordered a total rewrite of two years of work in Python. His rationale: it&#x27;s what everyone else uses in this space. No reason specific to our use case, just simply to follow the herd. I realise that a large community translates into easy hiring and rich ecosystems, but I despise the mentality as it promotes a monoculture.
评论 #35009071 未加载
评论 #35008690 未加载
评论 #35009110 未加载
评论 #35008870 未加载
评论 #35012788 未加载
评论 #35009123 未加载
samwillis大约 2 年前
I have been a heavy Python user now about 15 years, but for me now I&#x27;m increasingly reaching for modern JavaScript and particularly TypeScript to do the things I would have traditionally done with Python.<p>ES modules, fat arrow expressions, and all the other nice new syntax and library features have made the language so more pleasant to use. In many ways the ergonomics of TypeScript in particular are far superior to Python now, and I find that really surprising.<p>I haven&#x27;t yet found a replacement for Django (particularly the ORM&#x2F;Admin&#x2F;Forms combination) it is just so incredibly productive to use. So, I don&#x27;t think I will be moving off it, but it&#x27;s certainly not the growth language for me anymore.
评论 #35007365 未加载
评论 #35009462 未加载
评论 #35010802 未加载
评论 #35015572 未加载
评论 #35043397 未加载
gostsamo大约 2 年前
The article assigns significance to the language when the real work is done by the libraries. And many good libraries inspire even more good libraries. At that moment the language no longer matters. But it matters in the beginning when people have to create the initial environment and this is what should&#x27;ve been underscored. Python lets you do so many things in so many ways that minor mistakes do not matter and everyone has the freedom to experiment, achieve results, discover that they&#x27;ve done something stupid, but at that moment you already feel confident to do it again, but better.
评论 #35007357 未加载
agentultra大约 2 年前
I&#x27;d been in the Python community for around 10 years, spoke at several conferences, wrote libraries; contributed to CPython, Openstack, and others. I&#x27;ve been a technical reviewer for a book on distributed computing in Python. A big part of my career was built on this language, its community, and ecosystem. I&#x27;d say a big part of Python&#x27;s slow-and-steady success is its community. Going to Pycon US, Pycon CA, and Pycon&#x27;s around the world -- the user groups that the foundation funds with Pizza money and mentorship programs: it&#x27;s a fairly unique experience.<p>Another major factor is how it serves as a glue language in the scientific community. Python provides a relatively simple programming language that powers complex, powerful libraries like NumPy, SciPy, PyTorch, SymPy, etc. It&#x27;s like a scripting language for engineering and scientific computing tools, sort of like what Javascript does for browsers, Node, and Deno, etc.<p>I don&#x27;t do much Python programming these days but I owe it a huge debt! May it continue to flourish and grow.
评论 #35010172 未加载
pharmakom大约 2 年前
Comparing Python to Java 8 and saying it’s more readable isn’t showing much.<p>And it’s not very portable the second dependencies with native code (which is common since pure Python is too inefficient for many tasks) are used.<p>I think Python is popular for two reasons:<p>- it’s believed to be beginner friendly compared to other languages. I’m not really sure why - maybe the whitespace?<p>- it has an enormous set of libraries available to use<p>In other words, Python has momentum. The language itself isn’t great, but that is a secondary concern to most, if they are even aware of this at all!
评论 #35007337 未加载
评论 #35007147 未加载
评论 #35007295 未加载
评论 #35020712 未加载
评论 #35007271 未加载
评论 #35007185 未加载
评论 #35008722 未加载
评论 #35009948 未加载
评论 #35007670 未加载
_glass大约 2 年前
I remember the evolution of Python. When I started with my brand new Ubuntu installation when Ubuntu was also very new, there were two languages, Perl and Python. Because Perl was more popular at the time I check some books in the library, and wrote some scripts. But already then the consensus was, that even though libraries are lacking (!), it is the better, cleaner language. Another big push was the bad enterprise guys, that like static typing, so C, C++, Java, vs. the hipster dynamic language guys. Some tenets were broken, speed is not as important as language concepts, that enabled fast iteration. Agile was new, and Python was very agile. There was no real alternative to Python at that time, that was as sane, and beautiful. That&#x27;s the reason why we have now such a nice variety of libraries, because it is just a sane language to build on, if speed is not your business. Ruby was a contender, but not that much better in the end. Now Javascript kind of took the edge away from Python, even it wasn&#x27;t for the browser and the web, Python would dominate much more. Javascript as a language is worse than Python because of its cruft, so I don&#x27;t see a big rewrite of ML tooling into Javascript. Maybe Typescript.
评论 #35008216 未加载
t43562大约 2 年前
I learned Perl first and found it incredibly useful just because of regexps but Perl programs got messy as they got larger. Python regexps are just that bit less convenient and that trivial amount matters but in python I feel that once you get to writing functions and perhaps even classes it accelerates far ahead of Perl and you can write understandable, maintainable large programs in Python.<p>You&#x27;re not forced to dip into the OO side of things though and I&#x27;ve heard people suggest to me that Python is a language where no rules apply and no structure exists. They feel that they can dive in without the care they would have to take in Java or C++. I think they are very wrong but you can certainly write terrible code if you want and perhaps this &quot;all-things-to-all-people&quot; aspect of it is part of the success.
评论 #35007199 未加载
ngrilly大约 2 年前
It&#x27;s interesting that people keep claiming that indentation-based blocks makes Python easier to learn and read. I&#x27;ve been teaching programming to students in banking, finance and insurance for a few years, using Python, and my experience with them is the opposite. They have been struggling with that a lot. They didn&#x27;t pay too much attention to white spaces and tabs, probably because they are &quot;invisible&quot;, and couldn&#x27;t see why a statement was not executed at the end of the block, because it was not indented correctly. For me, it was obvious, because as a professional programmer, I&#x27;ve been trained to pay attention to details. But for most of them, it made no sense. Explicit block markers are much easier to teach.
评论 #35009254 未加载
评论 #35007663 未加载
评论 #35012865 未加载
评论 #35010960 未加载
blippage大约 2 年前
My go-to language is C++, although I know and have admired Python for a long time.<p>I had a BMP file which I wanted to transpose and turn into raw RGB 5-8-5 values. Using the Python Image Library made things absurdly easy.<p>That&#x27;s Python&#x27;s advantage in a nutshell. Things are just so absurdly easy.
评论 #35008587 未加载
评论 #35010335 未加载
willseth大约 2 年前
And yet, GitHub seems to be in no rush to support Python in GitHub Packages <a href="https:&#x2F;&#x2F;github.com&#x2F;orgs&#x2F;github&#x2F;projects&#x2F;4247&#x2F;views&#x2F;1?filterQuery=pypi">https:&#x2F;&#x2F;github.com&#x2F;orgs&#x2F;github&#x2F;projects&#x2F;4247&#x2F;views&#x2F;1?filterQ...</a>. This has been TBD status for years. Frustrating for anyone needing to manage private libraries and tools. And baffling, since Python is now the most popular language on their platform by most metrics <a href="https:&#x2F;&#x2F;madnight.github.io&#x2F;githut" rel="nofollow">https:&#x2F;&#x2F;madnight.github.io&#x2F;githut</a>
leetrout大约 2 年前
Tangent: Something interesting (and frustrating) ... I went to the LinkedIn assessments to take the Python assessment and over half the questions were specifically about Numpy, it&#x27;s API and matrix math. Which for me and what I generally do has nothing to do with &quot;Python&quot; and I was quite surprised to find that in the questions.
评论 #35010499 未加载
WoodenChair大约 2 年前
It&#x27;s a fine article and makes many of the standard points. But I would expect a slightly more data driven analysis from GitHub given the large amount of data available to them. For example, what percentage of first repositories (new GitHub users) are in Python? What percentage of GitHub Python repositories use a data science library? Etc.
photochemsyn大约 2 年前
They don&#x27;t mention that Python makes it really easy to interoperate with other languages via the subprocess module. So you can run Javascript web code via node, wait for it to finish, then move on to something else. Or you can launch a C++ process that&#x27;s can do real parallelism and wait for the results, avoiding many issues with the Python GIL.<p>Also, Python makes it easy to work in different programming paradigms, it&#x27;s as easy to write functional-type code as it is to write object-oriented code, both approaches are supported. This makes it a great prototyping system if you want to rewrite the code later in some other language like C++ to get some performance improvements.
评论 #35010555 未加载
评论 #35010996 未加载
JohnFen大约 2 年前
I just wish that I enjoyed using it. I&#x27;ve been doing a fair amount of Python work over the years because it&#x27;s been required by my employers, but to be honest, I kind of hate it.<p>I think the thing I hate the most about it is that white space is significant. It&#x27;s like we travelled back in time to the early days, and picked up one the bad things about them and brought it back. I find that makes it more difficult for me to read, and more difficult for me to write (from a mechanical type-in-the-code point of view).<p>I have other niggling issues with it, but if the white space thing weren&#x27;t an issue, I doubt the other issues would bother me enough to complain about them.
评论 #35012340 未加载
steveBK123大约 2 年前
Because its easy. Because it has an interpreter. Because it has notebooks. Because it has huge set of libraries &amp; easy library import. Because schools are teaching it. Because a lot of cloud native tools support it &#x2F; prefer it.
评论 #35009537 未加载
flohofwoe大约 2 年前
I used Python for the last 10 years or so for all sorts of cross-platform command line scripting stuff, but watching Python3&#x27;s progress I have the impression that this simple use case is no longer their main focus (I sometimes wonder if there&#x27;s any focus or vision at all tbh). After having tinkered with Deno for the last 2 weeks or so I must say that this is indeed the &#x27;better Python&#x27; (for me at least, and not because of Typescript - the language is more or less just an implementation detail for writing command line utilities - but because of Deno&#x27;s approach to package management).
评论 #35007093 未加载
HarHarVeryFunny大约 2 年前
Is the popularity due to Python itself, or due to the explosion in use of AI&#x2F;ML that all but mandates use of Python ?<p>It&#x27;d be interesting to see an attempt to assess the growth in use of Python outside of AI&#x2F;ML.
pavlov大约 2 年前
I wish I could wave a magic wand and replace all the Python in the world with JavaScript.<p>The languages are practically equal in terms of features. They&#x27;re both typeless with layered-on crutches available to make the runaway dynamism less painful. They both have weird footguns and ugly syntax and annoying design flaws, but these are different for each. So if you&#x27;re forced to use both languages, it&#x27;s an endless pain in the ass to remember which stupid runtime error can happen in JS but not Python and vice versa.<p>So JS can replace Python... But Python can&#x27;t replace JS simply because it&#x27;s unavoidable on the front-end. Since you must have JS code anyway, why use a language that&#x27;s functionally very similar but different enough in syntax and API that you&#x27;ll be writing bugs all the time? Just stick with JS and start drinking like me.
评论 #35009495 未加载
评论 #35009932 未加载
评论 #35009498 未加载
评论 #35011204 未加载
revskill大约 2 年前
Garbages keep growing, too.<p>It&#x27;s really hard to trace a Python bug based on codebase, due to its stricly bugly indentation sensitive for space&#x2F;tabs.<p>I rather work on a JS codebase than a python codebase.<p>But i consider Python coders genius, because they can go deep into rabbit hole really well.
评论 #35010405 未加载
qwery大约 2 年前
Github is primarily a website for developers, right? Who is the blog for?<p>This article is garbage. It reads like SEO trash and I&#x27;m not sure why Github feels the need to publish it. It&#x27;s just a list of common Python talking points. Points that the author displays a poor understanding of.<p>The article doesn&#x27;t really attempt to explain <i>why python keeps growing</i> but the facts listed vaguely suggest that it &quot;keeps growing&quot; (not sure when it was supposed to die) because it is Good and Popular. Which makes sense, I guess.<p>If the title was &#x27;10 Cool Facts About Python (a Programming Language!)&#x27; I would probably find it a little bit funny.
评论 #35015349 未加载
gorgoiler大约 2 年前
The comparison with Java is always a funny one. Consider this:<p><pre><code> import sys def main( args: list[str], ) -&gt; int: sys.stdout.write(“hi\n”) return 0 sys.exit(main()) </code></pre> Apart from the call to <i>write</i> instead of <i>print</i> everything else there is a standard Python pattern for writing testable, type-safe arg-parsing code!<p>It’s just that you don’t <i>have</i> to write testable, type-safe code if you don’t want to.
评论 #35007398 未加载
评论 #35015883 未加载
评论 #35007863 未加载
ur-whale大约 2 年前
Python is really nice.<p>Easy to learn yet powerful. Easy to read yet very concise. Anytime you need something complicated, it&#x27;s a pip and an import away.<p>Couple of downsides though: - slow - does not handle multiprocessing nicely.<p>If the python team ever manages to fixes these two (not easy or it would have happened a while ago) to bring it to - say - the level of Go, Python would be the absolute killer language.
xyzelement大约 2 年前
Python has a dual benefit - it&#x27;s &quot;easier&quot; to approach from the bottom of the skill level - ie easier for a new dev to pick up compared to what C++<p>But even as someone who knows C++, most of the stuff I do doesn&#x27;t require it - and python is often easier and terser to express the concepts.
DeathArrow大约 2 年前
I think people embrace Python because they think it&#x27;s easy to learn and use. While that might be true, the real complexity lies not in learning and using a language (unless it&#x27;s Rust) but in learning the libraries, frameworks, idioms, dos, don&#x27;ts, tooling.
mlboss大约 2 年前
How difficult it would be to transpile python program into a more performant language using a LLM ? This would solve so many issues. Write a code in python and convert it into C++&#x2F;Rust&#x2F;Assembly for performance.
评论 #35013532 未加载
评论 #35013425 未加载
ByteBandit大约 2 年前
So impressive to see all trading solutions&#x2F;bots made with Python! What do you think about Julia in this field: I see it as a viable alternative even if it lacks the huge amount of Python libraries?
dodgerdan大约 2 年前
Are people going optimistic about the efforts to make Python faster?
评论 #35007548 未加载
评论 #35007344 未加载
huggingmouth大约 2 年前
I switched to python last year because it has an excellent builtin library. No more having to download random crappy libraries that download even more crappy libraries.
评论 #35014715 未加载
DeathArrow大约 2 年前
I remember when Twitter rewrote the code in Java because Ruby wasn&#x27;t suited for the task. Probably this will happen to many large Python code bases in the future.
评论 #35009104 未加载
评论 #35010200 未加载
wwilim大约 2 年前
Dare I say, the article is quite a shallow take... but maybe that&#x27;s all there is - the apparent ease and the few industries that have been built on top of it?
Existenceblinks大约 2 年前
I dig a bit but not found how the percentage is from. Is it F(#LoC, #download, #repo, #active-in-past-x-year) something? What&#x27;s the calculation here?
3v1n0大约 2 年前
It&#x27;s definitely the best language for quick scripting and multi-os tools that requires some code organization, probably not for scaling stuff.
kajaktum大约 2 年前
Why haven&#x27;t Python replaced Make? Its cross-platform and can do pretty much any horrible monstrosities that people do in make and cmake.
评论 #35008269 未加载
awelxtr大约 2 年前
There is a typo on the Java Hello World example hehe
shpx大约 2 年前
$5 says this post was generated by ChatGPT.
stcroixx大约 2 年前
I’ve seen replace a lot of tasks that used to be done with Excel - non-programmers programming tool of choice.
boxed大约 2 年前
If the author of this article reads this: you have an error in a heading:<p>&gt; Using Python for and artificial intelligence<p>for <i>what</i> and AI?
评论 #35007429 未加载
评论 #35010274 未加载
DeathArrow大约 2 年前
I would take Nim over Python. Better designed, much faster. As readable as Python.
评论 #35009425 未加载
11235813213455大约 2 年前
it&#x27;s strange to me, because JS has so many advantages over Python, only remaining thing could be converting more scientific libs like scikit in JS
ZiiS大约 2 年前
Odd pitch from a company who use Ruby over Python.
theloco大约 2 年前
people love python. i never learned it but i figured the python indenting instead of bracketing thing would have spread more by now
epgui大约 2 年前
Python’s “simplicity” and “beauty” are always so over-emphasized. Maybe compared to something like C or Fortran or R… But it’s a pretty messy, complex language.<p>Try a lisp instead.
transfire大约 2 年前
Python is the new BASIC.<p>That pretty much says it all.
bandrami大约 2 年前
It&#x27;s a cool language, but it meeds a system for packaging and distributing libraries.
kilgnad大约 2 年前
The growth is actually too fast. I was a python expert. Now it&#x27;s not a big deal any more because the language is so easy. I&#x27;ve hit interviews where they DIDn&#x27;t want me to use python because it&#x27;s too easy.<p>I branched out to C++ and other languages to stay above the curve. Python is becoming like english, required to know, and not really a deep skillset employers are looking for now.