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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Python overtakes Java to become the second-most popular programming language

431 点作者 abunuwas超过 4 年前

32 条评论

iainctduncan超过 4 年前
I was a total raving Python evangelist for the first 12 years of my coding career, and then got a job as the CTO for a Python based startup that had been running absent a technical leader for 5 years, with relatively junior coders making all the decisions. I still love Python, but I now have a completely different attitude to hyper-dynamic languages (like Python, Ruby, Clojure, Elixir, etc). In my <i>new</i> opinion, they are great for anyone making small projects, and good for disciplined, experienced teams making larger projects, but are really double-edged swords in large projects. If your team really knows what they&#x27;re doing and can take advantage of the flexibility without creating a mess, they can let you move really fast and make elegant DSLs and so on. But if you let a team of juniors do whatever seems like a good idea, with nobody calling the shots who understands tech debt and the large-scale architecture problems, the mess that can be made is staggering. I never thought I&#x27;d say this before, but I would have been happier stepping into C++. :-&#x2F;<p>Sure, this is a problem of people, not language. But there is something to the argument that absent discipline and experience, these can be dangerous. One can detangle a dog&#x27;s breakfast in Java Spring a lot more easily.<p>(ever seen &quot;import gc&quot; in a Python program? yes, that means what you think it means..)
评论 #24999039 未加载
评论 #24999219 未加载
评论 #25000789 未加载
评论 #25000267 未加载
评论 #24999497 未加载
评论 #24999052 未加载
评论 #24999884 未加载
评论 #24999771 未加载
评论 #25001594 未加载
评论 #24999075 未加载
评论 #25001884 未加载
评论 #25001002 未加载
评论 #25000297 未加载
评论 #25000643 未加载
评论 #24999010 未加载
评论 #25000885 未加载
评论 #24999785 未加载
评论 #24999443 未加载
评论 #24999957 未加载
评论 #25001529 未加载
评论 #25000163 未加载
评论 #25001595 未加载
评论 #25004549 未加载
评论 #25000396 未加载
评论 #24999910 未加载
评论 #25007583 未加载
评论 #25000021 未加载
评论 #25002618 未加载
评论 #25002172 未加载
评论 #25003041 未加载
评论 #24999132 未加载
评论 #24998975 未加载
评论 #24999280 未加载
评论 #25002078 未加载
评论 #25001667 未加载
评论 #25000124 未加载
评论 #24999045 未加载
iainctduncan超过 4 年前
I was a Python dev for 14 years or so (now doing mostly personal projects in C&#x2F;C++, Scheme, Clojure), and 10 years ago met my partner who is a biologist. I think one thing programmers underestimate is how many scientists and academics are using Python. It&#x27;s not just ML, it&#x27;s pretty much every kind of scientist and tons of non-science academics too. The fact that it&#x27;s a great &quot;casual&quot; or part-time language is huge for these people. They aren&#x27;t full time (or even self-identifying) programmers, but their programs are non-trivial. The readability, portability, tooling, and massive package ecosystem is huge for them. In that world, being somewhat comfortable in R and Python is becoming table stakes for really large swathes of academia.<p>Personally I believe this is exactly why Python is dominant in ML now. We are harvesting after 20 years of academics happily writing libraries and tools for academic work in Python. :-)<p>So I have no idea how the article got their numbers, but I&#x27;m not at all surprised to see the sheer number of people programming in Python exploding.
评论 #25002191 未加载
评论 #24998890 未加载
评论 #24998896 未加载
评论 #25000918 未加载
评论 #25000391 未加载
评论 #24999176 未加载
评论 #24999945 未加载
smt88超过 4 年前
We need to start ranking languages based on what people use them for.<p>Python is certainly #1 in ML, for example, but far from #1 in web.<p>I had a &quot;which stack&quot; argument with a client recently for a web server processing tons of data. He wanted to use Node (which I hate, but also use when performance doesn&#x27;t matter because TypeScript is so good).<p>I showed him that the Node library ecosystem is actually pretty weak (many libraries, but most abandoned, single-contributor, and&#x2F;or low-quality). Of course, browser libs for JS are amazing.<p>My point is just that mixing all these things together in popularity rankings is pretty meaningless.
评论 #24998235 未加载
评论 #25000952 未加载
评论 #24997766 未加载
评论 #25001578 未加载
评论 #24998364 未加载
评论 #24999904 未加载
评论 #24998371 未加载
评论 #24999976 未加载
评论 #24998519 未加载
walkingolof超过 4 年前
Python is certainly popular, but the TIOBE Index ranking is not credible.<p>Quote: &quot;The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. &quot;<p>According to this index, &quot;Logo&quot;, beats out Rust, Scala, Kotlin, and Cobol.<p>I cannot remind myself when I last time saw a course, book or even any source code covering Logo.<p>This must be some very poorly vetted, automatically collected data that tripped over something provoking the ranking.
评论 #24998230 未加载
评论 #24997668 未加载
评论 #24997705 未加载
评论 #24999346 未加载
评论 #24997760 未加载
dep_b超过 4 年前
The past month I have used Python again after a few years and I have to say I didn&#x27;t quite like the experience as much as before. On one hand I also used vanilla Python instead of something easier to use like Django but the amount of preventable run-time errors and the lack of IDE autocomplete support at various points was kind of off-putting after coming back from very strictly typed languages like Swift, Kotlin or F#.<p>It also didn&#x27;t have the simplicity that Phoenix &#x2F; Elixir still has, for example when you Google how to solve problems you have Python 2 versus 3, the old way to handle requests which is limited and the new way to handle requests which isn&#x27;t as documented, yes you have type hints and named arguments but they&#x27;re not everywhere yet and so on.<p>So I don&#x27;t think I will circle back to use Python again unless there&#x27;s some kind of reason I can&#x27;t easily go around it. There are still some very good ideas in there (I like the braceless approach to code hierarchy and a standard on code formatting in general) and it&#x27;s definitely not as dumb as JavaScript but it has accumulated too much cruft.
评论 #24997706 未加载
评论 #24998307 未加载
评论 #24998589 未加载
评论 #24999816 未加载
评论 #24997992 未加载
评论 #24998228 未加载
评论 #24997969 未加载
评论 #25000435 未加载
评论 #24997710 未加载
dtech超过 4 年前
I personally find the methodology used in TIOBE very dubious. It frequently has very large differences with other metrics, and often &quot;feels wrong&quot; compared to those other metrics.<p>It mainly seems to massively overvalue historical significance, the older the language the higher it is. E.g. the current ranking has Perl 5x more popular than Typescript, and Visual Basic 2x as popular than PHP.
评论 #25002585 未加载
galfarragem超过 4 年前
It is biased towards (European) industry but <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;jobs" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;jobs</a> is a good metric on language <i>demand</i>.<p>Since I started to follow it systematically (mid-2019), the trends I perceive are: Java or Scala -&gt; Kotlin, JS -&gt; Typescript, Angular -&gt; Vue. Growth of (non-web) Python, React, Go and even PHP. Besides Kotlin, mobile tech demand seems stalled (Swift, React native, etc). Frontend demand is shrinking.
mangecoeur超过 4 年前
A point I think people miss with Python is they talk a lot about &#x27;Python Software Developers&#x27;, but I think the growth is coming from areas where people are NOT developers, but are using scripting&#x2F;automation in other fields. This is a much larger market than software development, and people will work very differently compared to developers.
aeturnum超过 4 年前
Like many people here, I&#x27;ve worked on large python deploys for most of my professional career and have, over time, come to see python&#x27;s downsides more clearly.<p>I also wonder, thinking back over my experiences and reading others here, if we are mis-ordering how these things come to be. Maybe it&#x27;s not that python codebases are, for a given line count, worse than other languages. Maybe it&#x27;s that python allows teams to continue using practices that aren&#x27;t suited to their current scale longer than other languages. The reason that we all have seen hulking, monstrous, nearly unworkable python code bases is that most other languages would have already collapsed under the mismatch between approach and desired outcome.<p>I think we often approach software engineering as a puzzle - where you have a set of inputs (a too-large codebase, for instance) and a question of how to a better state. But programming projects are path-dependent creatures. Huge codebases must develop over time - they don&#x27;t spring out of the heads of developers fully formed. If you were a typed language and your engineers had a lower LOC output per-day, then of course your code base will be smaller. Is that better? You iterate more slowly, but the scale of your code is also more manageable. In my experience, the challenge of large python code bases comes from the context that you need to understand from the surrounding environment: what are all these objects, what are their objects, etc. Typed languages force you to carry around more context, so any given function is easier to read, but you can still write un-navigatable code.
st1x7超过 4 年前
And they have C as number one? Visual Basic ranked higher than JavaScript? Groovy (!?) higher than Go, Swift and Ruby? R higher than SQL? What a joke the TIOBE index is.
评论 #24997839 未加载
评论 #24997994 未加载
评论 #24998254 未加载
评论 #24997922 未加载
SoylentOrange超过 4 年前
When I worked at Yelp circa 2013, we were an entirely Python shop (for backend). At that time, we had millions of LOC in Python. I love Python to death, but it became very clear that Python was simply a very bad fit for a project as large as Yelp.<p>I remember trying to write a program to simply understand our dependency graph so we could decouple some of our services (we were just starting our SOA efforts at that time). This is something other languages give you for free.<p>Our build times were exceptionally slow, as a direct result of Python&#x27;s dynamic nature. For example, test <i>discovery</i> took over 2 minutes on each test run. This also made it painful to have distributed test runs, as splitting up tests across multiple processes would require the test discovery step to be run in each process, incurring a 2 minute penalty per process.<p>We also had deployment issues, because of Python&#x27;s dynamic nature. Some code paths were only exercised during a production deployment, and were not sufficiently tested before deployment. This is despite the fact that we had tens of thousands of tests and sunk many hundreds of person-hours into testing as much as was possible. Despite a very professional engineering culture, and a constantly expanding test suite covering these corner cases, we had deployments fail about once a week for this reason.<p>I adore Python and still use it extensively most days (mostly its data science&#x2F;ML libraries). But I now think that large projects would really benefit from static typing and strict compiler checks, as well as just being able to actually compile a binary (which would have solved many of our testing woes). In contrast to some other smart people on this thread, I don&#x27;t think that even disciplined developer teams should use Python for large projects, at least not in the long-run.
评论 #25000373 未加载
amw-zero超过 4 年前
Regression to the mean is the most powerful force in nature. Try as you might, you have to use what everyone else is using. Which is also very hard to continuously do in an industry that has ADD.
rho4超过 4 年前
Darn it, yet another hint that I&#x27;m not getting any younger. 20 years of Java experience and no intention of learning a new language... When prompted, I usually snark that you don&#x27;t ask a professional violin player to &quot;just&quot; switch to viola either.
评论 #24999507 未加载
pydry超过 4 年前
I&#x27;m surprised TIOBE is still taken seriously these days. It certainly sort-of correlates with popularity but it&#x27;s a bullshit measure.
评论 #24998653 未加载
tomohawk超过 4 年前
Of the top 10, only Java has experienced a year on year drop.<p>So, at least some of the gains are at the expense of Java.<p>For C and C++, you&#x27;re probably not going to reach for Python as a replacement. It&#x27;s not like in the 90s when these were considered general purpose. If you&#x27;re using them these days, it&#x27;s more likely due to needing to use them.<p>Java is still used for a lot of other things where a language like Python would be fine and likely more productive. Also, I have a feeling that the large growth in go from #20 to #13 likely also came at the expense of Java.<p>That, and the pie is growing. Python is taking a larger share of the larger pie.
评论 #24997842 未加载
commandlinefan超过 4 年前
&gt; Python has long been a top-loved programming language, as has Java<p>Um... nobody _loves_ Java. We use it, but we don&#x27;t love it.
评论 #24998880 未加载
评论 #25001592 未加载
评论 #24998845 未加载
评论 #24999441 未加载
the5avage超过 4 年前
This might be a stupid question but anyway...<p>Is there someone well-versed in a statically typed language who would still prefer python most of the time? Could you explain why?<p>For me it&#x27;s just the opposite. When I program I think about the types first. When I read code I care more about types than variable names. This is in my opinion the way to go even in C.<p>Also most python programmers I know are engineers and for them it would be a waste of time to learn C++. I would like to know why an experienced developer might prefer python ...
评论 #25002349 未加载
评论 #25002155 未加载
crnkofe超过 4 年前
Now that is some epic movement right there. C, Java have been up there in front for decades which I&#x27;ve occasionally explained to nonbelievers by sharing the TIOBE index. The winds of change are blowin&#x27;.<p>By adding stricter typing and a bunch of middleware I can easily imagine a Python EE one day but let&#x27;s hope that doesn&#x27;t happen. Duck typing, a taste of functional paradigm, non-verbosity is what makes Python special IMO.<p>I wonder if Go, Rust might make it to top C one day.
the5avage超过 4 年前
Citing tiobe.com: &quot;The index can be used to check whether your programming skills are still up to date or to make a strategic decision about what programming language should be adopted when starting to build a new software system.&quot;<p>This and the fact that C is number one suggest something very wrong. While C really has a place in my heart, you should have very good reasons to use it when &quot;starting to build a new software system&quot;.
评论 #25004108 未加载
maurys超过 4 年前
I might disagree with how &quot;popularity&quot; is computed here, but as long as they have been consistent, the trend is probably real.<p>IME Java still has a very real stranglehold on business logic code, especially in bigger companies.<p>Golang and Rust are eating away at it, but more for infrastructure related projects rather than higher-level business logic.
jeff-davis超过 4 年前
&quot;In the past, most programming activities were performed by software engineers. But programming skills are needed everywhere nowadays and there is a lack of good software developers,&quot;<p>This is an important distinction and often missed from programming language discussions.<p>Engineering languages like C++, Java, Rust focus on being able to create robust APIs, handle incredible complexity, deal with dependencies, etc. Hacker languages like Python, PHP, erlang, and Go focus on an approachable language, libraries that tackle problem domains, etc.<p>There is obviously a lot of overlap. But I think it&#x27;s good to keep in mind that engineering and hacking don&#x27;t always align.
bpyne超过 4 年前
Python is an excellent teaching language. It&#x27;s simple to install. You follow a tutorial by typing something at the REPL and it gives you results. Learning stuff like importing modules, etc. happens as your coding ambitions increase.<p>Something else to consider is the Python shell at python.org&#x2F;shell. Students often have Chromebooks. I&#x27;m about to mentor second year high school students who are interested in CS. Several of them have Chromebooks only. I can recommend Python and point them to the shell.<p>I would think Python got a good bump through Hour of Code and other programs to introduce people to coding.
timwaagh超过 4 年前
Python is a worthy successor to Java. people who like top complain about types are invited to run mvn clean install for each change instead of using type hints. I continue to go through that each day. it pays better. Java is the new cobol, hopefully.<p>Still, with C bring #1, one has top wonder about the quality of the index. Both Python and Java are much more common in the business.
cryptos超过 4 年前
I&#x27;m somewhat tired of claims based on the &quot;scientific&quot; TIOBE index!<p>Although such rankings are mostly good for entertainment, I&#x27;d whish there were a better, more solid index. Redmonk is better, but a bit too limited in its data source (Stackoverlfow and GitHub).
jaimex2超过 4 年前
&quot;Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings&quot;<p>These ratings seem pretty meaningless. Visual Basic is #6, tell you pretty much all you need to know.
uses超过 4 年前
I got back into python recently and one thing that really confused me: there&#x27;s no good way to manage packages, apparently? Meaning: if someone clones my repo, there&#x27;s no single, correct way for me to have specified the dependencies in a machine-readable format, so they can run the equivalent of &quot;npm install&quot;, and get things working. Is that really true?
评论 #25001121 未加载
评论 #25000661 未加载
评论 #25005490 未加载
suyash超过 4 年前
Python for toy projects, scripting, ML and Java for real scalable applications is the way to go IMO.
knodi超过 4 年前
I don&#x27;t know why in today&#x27;s day and age people switch to Python, the python version bumps is such a wreck. Pip and Pipenv are 10 years behind the eco system. so many other better langs out there that are more uniform.
评论 #25000864 未加载
dionian超过 4 年前
Makes sense due to the proliferation of new JVM languages.
master_yoda_1超过 4 年前
Thats says lot of amateurs are doing programming today, who have no idea what programming is.
qwerty456127超过 4 年前
If it&#x27;s the second, what&#x27;s the first? PHP? :-)
stosto88超过 4 年前
I love Python but I have been hearing this for years. Its programming newbies attempting to gain new skills and searching stackoverflow 100s of times like I used to. Also, I search for jobs online...Python is not the backend tool for the vast majority of companies. Like the creator of Pandas&#x27; (Python library) says ....Python is the SECOND best tool for everything.