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'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'd say this before, but I would have been happier stepping into C++. :-/<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's breakfast in Java Spring a lot more easily.<p>(ever seen "import gc" in a Python program? yes, that means what you think it means..)
I was a Python dev for 14 years or so (now doing mostly personal projects in C/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's not just ML, it's pretty much every kind of scientist and tons of non-science academics too. The fact that it's a great "casual" or part-time language is huge for these people. They aren'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'm not at all surprised to see the sheer number of people programming in Python exploding.
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 "which stack" 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'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/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.
Python is certainly popular, but the TIOBE Index ranking is not credible.<p>Quote: "The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. "<p>According to this index, "Logo", 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.
The past month I have used Python again after a few years and I have to say I didn'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't have the simplicity that Phoenix / 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't as documented, yes you have type hints and named arguments but they're not everywhere yet and so on.<p>So I don't think I will circle back to use Python again unless there's some kind of reason I can'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's definitely not as dumb as JavaScript but it has accumulated too much cruft.
I personally find the methodology used in TIOBE very dubious. It frequently has very large differences with other metrics, and often "feels wrong" 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.
It is biased towards (European) industry but <a href="https://stackoverflow.com/jobs" rel="nofollow">https://stackoverflow.com/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 -> Kotlin, JS -> Typescript, Angular -> 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.
A point I think people miss with Python is they talk a lot about 'Python Software Developers', but I think the growth is coming from areas where people are NOT developers, but are using scripting/automation in other fields. This is a much larger market than software development, and people will work very differently compared to developers.
Like many people here, I've worked on large python deploys for most of my professional career and have, over time, come to see python'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's not that python codebases are, for a given line count, worse than other languages. Maybe it's that python allows teams to continue using practices that aren'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'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.
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.
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'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'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/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't think that even disciplined developer teams should use Python for large projects, at least not in the long-run.
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.
Darn it, yet another hint that I'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't ask a professional violin player to "just" switch to viola either.
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're probably not going to reach for Python as a replacement. It's not like in the 90s when these were considered general purpose. If you're using them these days, it'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.
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'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 ...
Now that is some epic movement right there. C, Java have been up there in front for decades which I've occasionally explained to nonbelievers by sharing the TIOBE index. The winds of change are blowin'.<p>By adding stricter typing and a bunch of middleware I can easily imagine a Python EE one day but let's hope that doesn'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.
Citing tiobe.com:
"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."<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 "starting to build a new software system".
I might disagree with how "popularity" 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.
"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,"<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's good to keep in mind that engineering and hacking don't always align.
Python is an excellent teaching language. It'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/shell. Students often have Chromebooks. I'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.
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.
I'm somewhat tired of claims based on the "scientific" TIOBE index!<p>Although such rankings are mostly good for entertainment, I'd whish there were a better, more solid index. Redmonk is better, but a bit too limited in its data source (Stackoverlfow and GitHub).
"Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings"<p>These ratings seem pretty meaningless. Visual Basic is #6, tell you pretty much all you need to know.
I got back into python recently and one thing that really confused me: there's no good way to manage packages, apparently? Meaning: if someone clones my repo, there's no single, correct way for me to have specified the dependencies in a machine-readable format, so they can run the equivalent of "npm install", and get things working. Is that really true?
I don't know why in today'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.
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' (Python library) says ....Python is the SECOND best tool for everything.