16 ms·
Python is becoming the world’s most popular programming language
- miohtama 8y agoNon-paywalled summary http://www.blog.pythonlibrary.org/2018/10/09/python-worlds-most-popular-language-in-2018/ http://www.blog.pythonlibrary.org/2018/10/09/python-worlds-m...
- Dowwie 8y agoHey Mikko!
- accrual 8y agoNon-canvas fingerprinting summary: http://www.blog.pythonlibrary.org/wp-content/uploads/2018/10/econo_chart_py.png http://www.blog.pythonlibrary.org/wp-content/uploads/2018/10... I found the data points coarse (x = 5 years) but useful to see similar trends of popularity between C, Javascript, and Python. Note: these metrics are defined by global search engine popularity.
- noobermin 8y agoWhat happened to lisp in the last five years?
- empath75 8y agoDoesn’t seem plausible that both c and c++ are more popular than python.
- yellowapple 8y agoWhy not? C++ is still the de facto standard for desktop software (including games), last I checked, and C is still the de facto standard for systems and embedded programming. Python hasn't really displaced anything in either realm as far as I can tell (some C/C++ codebases use Python for user-customizable scripting or plugins, sure, but it probably ain't doing the heavy lifting).
- metildaa 8y agoThis doesn't match what I see and hear, on Windows if you already have a C/C++ codebase, its likely that one will stick with that. Otherwise, legacy Visual Basic/Delphi programs seem to consistently be rewritten in C# (primarly due to Microsoft heavily pushing it, providing tons of documentation and easy examples). This is the impression I get from a few proprietary software vendors I used to work with, and those that pop up at local events in my area. I can't name one actively migrating to C/C++, C# is big if your stuck on Windows. That being said, I have been diligently avoiding proprietary software for the last few years. My life is much happier without it, ain't got no licensing worries :D
- denisw 8y agoThat entirely depends on how “popular” is defined. If you mean “preferred choice for greenfield consumer and B2B apps”, then yes, C/C++ would be ranked way lower. But as far as I understand this statistic is based in search results, so it takes into account the huge body of existing software that needs maintenance (after all, you need to stay up-to-date and also look things up again from time to time), as well as domains in which C and C++ are a good still dominating, such as programming embedded devices.
- yellowapple 8y agoI wonder if those statistics are accounting for people searching for snakes.
- Swizec 8y agoWait wasn’t JavaScript supposed to be most popular? Every device in the world shipping with at least one environment for JS? Or does it not count because you don’t distribute binaries?
- martinsbalodis 8y agoI was thinking the same thing. Their google search language comparison is probably incorrect. For example no one includes the keyword "javascript" when searching for nodejs or react. Instead they should have used Stackoverflow's developer survey results. From an article that analyzes Stackoverflow's developer survey results[1]: 1. JavaScript 2. HTML 3. CSS 4. SQL 5. Java 6. Bash/Shell 7. Python 8. C# 9. PHP 10. C++ [1] https://www.businessinsider.com/14-most-popular-programming-languages-stack-overflow-developer-survey-2018-4 https://www.businessinsider.com/14-most-popular-programming-...
- realusername 8y agoYes that list sounds much more realistic to me.
- cm2187 8y agoBut nodejs and react aren’t programming languages. No one is including “c#” when searching for spreadsheetgear, asp.net or wpf even though they are .net libraries and frameworks.
- TeMPOraL 8y agoPrecisely the point. If you don't count searches for popular libraries and frameworks into their respective language buckets, the results are mostly bullshit, and at best probably reflect the undergrad curriculum.
- cimmanom 8y agoYeah, JavaScript also has too many names for the language itself. I mean, I search for “Django” or “Python 3” instead of “Python” half the time. But with JS, if I’m looking for info about the language itself it’s usually with the keyword “ES6” instead of “JavaScript”.
- qualsiasi 8y agoPython is really widespread, but at least in my company it's used for analysis and prototyping only. Then the prototype is ported either to Java, C# or C++. I don't know if it's common practice, but we work like that and totally makes sense to us.
- deleted 8y ago[deleted]
- metildaa 8y agoDepends on the organizations needs, for what we work on performance does not matter terribly much, thus a MVP in Flask is often cleaned up and put up on Gitlab (with a Github mirror) once its vaugely usable.
- qalmakka 8y agoLanguages have always come and gone; Python has always mattered, it's simply finally showing itself as a much more suited tool for certain tasks (such as CS education, lightweight scripting by data scientists, glueing together large frameworks, ...). While popular, it can't really hit every single spot required in software development; try to maintain > 10k LOC codebases in Python to understand what I mean. The point that I'm trying to say is that, while we're living in a moment where python is at the center of everything, it won't last forever; it never does. Something better always shows up, given enough time.
- pmiller2 8y agoI’ve worked on Python codebases >100k LOC with no issues. What actually is your point?
- toolslive 8y agohaving been on the receiving end of a large python project, I can say that refactoring is (trying to stay polite here) a challenge.
- pmiller2 8y agoI don’t see how that has anything to do with Python per se. It’s more of an issue with large codebases.
- toolslive 8y agoDynamically typed languages make it harder to refactor a large codebase than statically typed languages do.
- jernfrost 8y agoIn some ways and some ways not. Making a global change is much harder in a dynamic language. However static languages by their very nature tie the code together more tightly. It is much easier to decouple something in a dynamic language. The re-factoring needs in a dynamic language is thus entirely different.
- nuttymoon 8y agoHow do you compare the popularity of full featured languages like Python to languages like JavaScript that have numerous frameworks built upon. Were React, Angular, Vue, Typescript search results taken into account to draw this graph ?
- peter-m80 8y agoDon't forget node.js
- easytiger 8y agoIn your reductive analysis x86 ASM is the most popular language or every Python application is a c application.
- posamari 8y agoThat’s not the point. Many JS devs google “Node xxxxx” but still code with JS. Not many people search for “Python xxxxx” and code in C. Offtopic: I disagree with grandparent, for different reasons.
- easytiger 8y agoMany people google "boost graph library" but are c++ developers or google "pandas how to drop columns", "numpy how to append to array" but are python developers.
- cm2187 8y agoIt’s interesting that by this metric, vb.net beats javascript. It’s remarkable for a language which maintainers have placed in maintenance only mode. I think it is a language that people should consider for beginners. Rich and helpful IDE, easy and permissible syntax (english keywords rather than symbols, case insensitive, optional parenthesis). You can do pretty much anything with it (console, desktop, website). And it provides an upgrade path to business users which only programming skills are usually toying with VBA macros.
- jschulenklopper 8y agoHere's a nice combination of _Python_ and an _economist_: Paul Romer, this year's Nobel prize laureate in economy, moved from publishing recent research using Mathematica to Python and Jupyter notebooks. https://qz.com/1417145/economics-nobel-laureate-paul-romer-is-a-python-programming-convert/ https://qz.com/1417145/economics-nobel-laureate-paul-romer-i...
- amirmasoudabdol 8y agoI found it funny/interesting that the title called it "coding" instead of "programming" language!
- gaius 8y agoYes, you can imagine the author of the article saying Nikon is the best for clicking, or that Gordon Ramsey is the best at chopping.
- a_imho 8y agoWith such a rapidly growing user base and wide array of capabilities, Python might seem destined to become the lingua franca of coding, rendering all other competitors obsolete. I realize it is weasel worded not to mean what it implies but statements like this is a surefire way to lose any credibility. Not that there was much underpinning besides some search engine popularity. Nevertheless I'm baffled by python's popularity. With my admittedly limited exposure I would not reach for it again any time soon. When it is the right tool for the job?
- FabHK 8y agoHow does that make The Economist "lose any credibility", when the very next sentence is > That is unlikely, according to Grady Booch, IBM’s chief software scientist, who compares programming languages to empires.
- pmart123 8y agoComing from a data science background, I wasn't surprised by this. * From doing Engineering problem sets in Matlab and also using Java and C/C++ in CS classes, Java's inability to overload operators made it unbearable for anything math related. * C/C++ wasn't bad to write small algorithms but as someone wanting to look at data, I really wasn't up for solving memory leaks. * Then the big problem with languages like Matlab is they aren't general purpose programming languages. This meant things tooling around things like sending an email notification, creating a light web framework, etc. were limited, meanwhile, numpy's eco-system began offering many of the same benefits to the commercial data science libraries.
- jarfil 8y agoPython is in part a "quick and dirty" language that nevertheless has many advanced features, which means it's a great language to easily hack something together. Whether to use it afterwards in production... it doesn't shine in the maintainable aspect (it allows for some killer one-liners close to perl level), or in the low level performance aspect, so there might be some better alternative for a particular case. Still, Python and in particular Python 3.x is a decent compromise between hackiness and something more serious, so it's no surprise that many choose it as a starting point.
- jokoon 8y agoWell now we have to wait for a v8 equivalent for python. I guess pypy doesn't really make python that much faster, can it be faster?
- rkeene2 8y agoYou could look to TclQuadCode for inspiration as it can make Tcl code 66x faster in the best cases.
- jacinda 8y agoHave you looked at Cython?
- jacinda 8y agoYou can also profile your code to find the hot spots and write C extensions just for those areas.
- bakery2k 8y agoPython is, despite its simple appearance, a much more complex language than JavaScript. A V8 equivalent for Python is certainly possible, but would require even more work than went into creating V8 itself - who would be motivated to spend that much effort on Python? Dropbox? They seem to be the company driving Python nowadays, but gave up trying to speed up Python in favour of writing "performance-sensitive code in other languages" [1]. PyPy uses a meta-tracing approach in an attempt to reduce the amount of work required. Its speed is impressive, but I'm sure meta-tracing leaves some performance on the table. Another way to reduce the amount of work required would be to support only a subset of the language - for example, a V8 equivalent for MicroPython rather than for full Python. I'm sure this could be made very fast, but it would have very poor compatibility with existing Python code, so what would be the point? [1] https://blog.pyston.org/ https://blog.pyston.org/
- jokoon 8y agoWhat makes python so complex? What are the features that if removed could really improve performance? I love python's syntax, but I could do without its lazy interpretation, without duck typing if possible, and without its reference system. In short I just like the syntax of python, I don't really care about its modules.
- diminoten 8y agoHaving worked in Python as a way to pay for food nearing 7 years now, the biggest complaint I have at this point is that, at an enterprise level, it's severely under-equipped to enforce its touted "There's probably one right way to do things" mantra. People are often introduced first to Python by way of scripting, but the tricks and tools learned while scripting are exactly the sorts of things I've found cause dirty code. Applying clean code principles to Python is hard, because it's so easy to write dirty code, and that's a byproduct of how easy everything is to do in Python. That ever-nagging "but it's working" continues to get in the way. It's a weird problem. I dunno what to do about it, and currently end many of my debates with colleagues on topics related to the problem without agreement.
- houzi 8y agoMost programming languages suffers from lack of enforcing idiomatic coding style, don't you think? Perhaps python more than others? Scientists having learned that OOP is the one true methodology make horrendous code if a language has classes. I've also seen FP coders being a bit too extreme in Python, inlining everything and not using comprehensions.
- ubernostrum 8y agoPeople are often introduced first to Python by way of scripting I don't believe this is true, and I don't believe it's been true for quite some time. First encounters with Python now tend to be via frameworks, whether for web development, machine learning, data science or automation.
- diminoten 8y agoIt was true recently enough ago that the people writing Python code professionally were introduced to Python from a scripting entrypoint. For non-programmers, I think it's definitely still true that "scripting" is their primary use case for Python, and when those non-programmers shift into software development jobs because they have "3 years experience" with Python, they bring all of their bad habits with them.
- moomin 8y agoStackOverflow has the data on this: Python for most purposes is entirely static. Python for data science is utterly dominant. That’s what’s driving the stats.
- sathishvj 8y agoI can see the sudden jump in popularity for python alongside data science - it really is great for that. My view is: python is great for offline tasks, like functional testing and training in machine learning - tasks that do not have huge, direct customer interaction. But to put something in production, please give me a strongly typed language with compiled binaries and no additional installations/VMs (and for me that's Go).
- devxpy 8y agoYeah distribution is a _huge_ problem for python right now.
- timClicks 8y agoIs it though? I mean, yes there is fragmentation and lots of old documentation but that's because Python is 25 years old and several approaches have been tried. What's especially difficult about the following two steps? pip install pyinstaller pyinstaller main.py
- Rotareti 8y agoThere is another interesting approach on the horizon: https://github.com/Nuitka/Nuitka https://github.com/Nuitka/Nuitka Nuitka compiles your Python code to C and leaves you with a single file binary. It also improves performance.
- jimbo1qaz 8y agoUbuntu 18.04, Miniconda 3.6 with Numpy etc. I tried Nuitka on my own project, it kept spinning for 20 minutes compiling Numpy dependencies. I eventually gave up and killed the process.
- firdak 8y ago> pyinstaller main.py One issue with PyInstaller is that it doesn't create a proper standalone binary. It either gives you a full directory tree or, with `--onefile`, an archive which self-extracts into such a tree.
- hyperion2010 8y agoI started programming in python in 2010. It has been a good tool for solving a variety of problems. I do have to wonder though. Is python popular right now because so many more people who have never programmed before are now starting to program? I came from a biology background and my hatred for matlab following one quarter of exposure was sufficient to push me to python because that was what was offered as an alternative (taught by a gradstudent rather than the guy who funded the lead dev for the Octave project). There was no other choice. Julia didn't exist etc. In the 8 years since I have written a lot of bad code have come to very much dislike python (though I still write it daily). The reason is not because of any of the visible failings of the language. It is due to the deep hidden inconsistencies, and unexpected and unpredictable behavior of the runtime (try using list comprehension in class scope (What is class scope you ask? Well. Python is a language for newbies... so by the time you can ask this question you are too invested to realize that you might have made a bad decision)). Python is kludge on top of kludge without the diversity of implementations to take another path when someone calls bullshit. Python can get away with it because they have runtime hacks that let you sort of do what you want, but there will be a corner case that doesn't work because there is some unspoken and undocumented assumption that you are violating and will be duly punished for. None of this is the language's fault. It's the runtime's. The python runtime (don't even bother with discussion about the GIL, which is a red herring and a bad case of Stockholm syndrome at the same time) is a mess. The language is fine, even great. But the fact that different scopes have radically different meaning and that expressions only work in certain scopes [0] is a complete nightmare. My main emotional interaction with python is that if I follow the BDFL approved path, everything will work. If I stray from the fascistic predetermined happy path, good luck to me, I was on the wrong side of history TM. 99% of the code that I write that doesn't start as a class I end up rewriting as a class (probably because python doesn't have closures ...). Python lures you in with promises of easy to write easy to read, but when you get to that point where your actions are no longer approved then then pain and sadness and rage are all you have left. I won't name the language that has almost the opposite interaction that I come to vastly prefer, but the emotional experience is radically different, I get extremely frustrated because I don't understand something in that language, and eventually come to realize it is because I did not understand something simple. In python I initially think that I am the one to blame, but after months or years, I finally realize that it is actually the language that is fundamentally broken and inconsistent and I have been mislead the entire time. I get frustrated because there no possible way for me to solve my problem by increasing my knowledge, I would literally have to fix a 4+ year old problem in the language (which I'm sure I couldn't do and that I'm sure has not been done for very good technical (debt) reasons), or find a library. There are a lot of libraries, but don't be fooled. Every library is a new language. Python is just the gatekeeping runtime. Python will thrive for a large set of use cases, but when you hit a wall in python, the problem is not because you don't understand, it is because python is broken. That is not a happy realization. It is like growing up and realizing that people are actually evil, not that you were just misunderstanding them. Or more generously, that expecting people to be on their game 100% of the time is unrealistic. The difference is that python is that attractive person that is great at first impressions, but a disaster in the long term, and if I hadn't had the good fortune to meet a language that was super awkward for the first 6 months or so, but turned out to be a keeper, I'd believe that python was the only thing there is. Python is and abusive language, and probably exists and is successful because things like perl also exist (and because it solves a whole bunch of practical problems). I'll keep using python for a long time, and the coming of age of pypy brings me great hope for the future, but there are classes of problems where I now go elsewhere. There are problems everywhere, but in some places they seem to be rational rather than contingent. tl;dr Don't pick a language, pick a runtime. 0. https://github.com/ipython/ipython/issues/62 https://github.com/ipython/ipython/issues/62
- bsimpson 8y agoAt the bottom of the page, there's a link to "the full article": https://www.economist.com/science-and-technology/2018/07/19/python-has-brought-computer-programming-to-a-vast-new-audience https://www.economist.com/science-and-technology/2018/07/19/... It's fascinating to see the differences between the two. The OP is a bit shorter and a bit more awkwardly worded. It also inlines some names (for instance, referring to the package manager as "an online repository" instead of "the Cheese Shop"). I wonder if the OP was written for the website (with a lower quality threshold) and the "full article" was edited/expanded-upon for the more prestigious print edition.
- pinoytambayan 8y agoWhat about Asp.net?
- romanovcode 8y agoIt's not a language
- legostormtroopr 8y agoAs a huge fan of Python, my go-to statement is that Python is the second or third best language for whatever you want to do. Want to do web server development? Flask, Django, Tornado, etc... can do that. Probably not as concurrently as Go, but it'll do. Scientific computing? Its no Matlab, but the syntax is easy and the time you lose in processing you make up for when developing. Desktop computing? PyQT is pretty good. Electron may be faster to build with, C will be faster at runtime, but Python, even with Tkinter, is ok. Functional programming? There are list comprehensions, map, reduce and filter. Not as good as Haskell or Lisp, but it'll do. Python isn't the killer language for any of these really, but its good enough in almost all cases that you'll be very productive and can iterate to a good MVP quicker than with most other languages.
- zimablue 8y agoIt's the killer language in scientific computing I'd say, having used both Python and Matlab. The open source nature/libraries and being a more fully-powered programming language (expressive object system) make it better.
- dagw 8y agoAs someone who does a lot of scientific computing in Python, I'd probably recommend learning Julia as the 'killer language' if scientific computing is the main reason you want to learn programming. Pythons strength comes from being pretty good at scientific computing, and equally good at just about everything else.
- zimablue 8y agoI haven't tried Julia, it sounds like it could be better in the long run but I'd be shocked if the ecosystem is equivalent already.
- ForHackernews 8y agoLuckily, you can call many Python libraries directly from your Julia code: https://github.com/JuliaPy/PyCall.jl https://github.com/JuliaPy/PyCall.jl
- ts330 8y agoJust because people are searching for it doesn't mean it's popular. It means people are trying to answer a question about it. I'd posit there is more of a correlation between searches and newusers/issues/problems with the tool/language than how much it's being used. Stack Overflow is a better source for these stats anyway.
- iliaznk 8y agoPython is great, I just wish it had JS-like object destructuring applied to dicts – so convenient!
- rataata_jr 8y agoIf you can think it, it can be done. There is probably a library for it. It is just not standard.
- iliaznk 8y agoThat I have no doubts about, but having it in the standard lib would be awesome!
- Rotareti 8y agoMe too. There is a library that solves this: https://github.com/Infinidat/munch https://github.com/Infinidat/munch from munch import Munch foo = {'a':1, 'b':2} foo = Munch(foo) print(foo.a) # 1 print(foo['a']) # 1
- jasongi 8y agoYou mean like a = {"foo": "bar", "bar": "foo"} b = {**a} You can do this since 3.5 https://www.python.org/dev/peps/pep-0448/ https://www.python.org/dev/peps/pep-0448/ You can also do dict comprehensions which is much more expressive b = {k: v for k,v in a.items() if v == "bar"} This way you can copy only the parts of a dict you want in a simple one-liner. https://www.python.org/dev/peps/pep-0274/ https://www.python.org/dev/peps/pep-0274/
- devit 8y agoIs it really? Seems unlikely Python can be more popular than JavaScript/TypeScript since they are equivalent to Python and have the critical advantages of working on the web (and thus being known by all web developers) and having optimized engines in web browsers.
- goatlover 8y agoThe computing world is a lot larger than the web, believe it or not. Python is huge in scientific computing, and is used for lots of server-side scripting. JS/TS don't have much of a presence in scientific computing beyond the web presentation layer, which can be generated from Python libraries. Python is used everywhere in science, and the ecosystem is incredibly rich.
- deleted 8y ago[deleted]
- Jenz 8y agoWhile pythons popularity is undeniable, Im sceptical to the article as it’s based on the TIOBE index.
- zmmmmm 8y agoI understand it (and code a hell of a lot of Python) - but it's a shame. While it's a lot better than the many low-barrier-to-entry languages that came before it, it is such a heavily compromised, suboptimal language in so many ways. I feel like a whole generation of programmers is becoming stuck in a local optimum that will cost us very dearly later on.
- djaychela 8y agoHow so? Not trying to pick an argument, just wondering (as someone who's learning Python) what you mean, specifically, that will lead to this?
- zmmmmm 8y agoWell, this is how lengthy arguments start about pros and cons of languages, as there are many many people who will argue these are not problems or can be worked around or are actually preferable for whatever reasons. But my biggest problems with Python are: - Lack of strong enough / useful / culture around typing - Effective limitation to single core through GIL - Lack of proper solution to closures Really the first two are the ones that make it for me, a fundamentally crippled language. And they are exactly the things you don't notice when starting out, and the things that limit you eventually.
- batty_alex 8y agoWhile you're likely correct that FORTRAN, COBOL, C, Visual Basic, C++, Perl, ColdFusion, Java, Javascript, and Python, were sub-optimal choices, they're just tools whose popularity boils down to current programming pop culture. That being said, it could be something much worse than Python.
- senorjazz 8y agoWhen ever you start feeling like this, just think to yourself how bad things would be if it was javascript that won and was used everywhere... oh wait :(
- asien 8y agoNever been a fan of Python , but all the comments about Java are legit. I’m a big Java User mostly for Enterprise Apps & Services. A third of my code is boilerplate, Python really shine when it comes to making stuff concise but in the same way not having type is something that has always bothered me. Dynamic typing is something I have accepted with JavaScript but for Python for some reason it has always bothered me...
- a3n 8y agoPython is a strongly typed language. https://duckduckgo.com/?q=python+strongly+typed&t=fpas&ia=qa https://duckduckgo.com/?q=python+strongly+typed&t=fpas&ia=qa
- RickJWagner 8y agoI'm not surprised. Python is a very easy language to learn and use. In the end, ease of use always wins.
- puranjay 8y agoI picked up Learn Python the Hard Way. Really enjoyed it. Was super easy even for someone new to programming. But got lost when I reached the OOP part. This speedbreaker, along with a few other distractions effectively eroded my enthusiasm for coding
- village-idiot 8y agoA few jobs ago was in Python. Joy to write, absolute terror to deploy. Seared into my mind was a failure caused by delivering .pyc files (oops) to a server whose shared libs were compiled with different flags than our CI box. To be fair, this was before docked (or at least before I’d heard of it). Maybe that’s improved things a bit.
- mywittyname 8y agoDeployment is still mostly awful. The community is still tackling this issue as of 2018. https://realpython.com/pipenv-guide/ https://realpython.com/pipenv-guide/
- village-idiot 8y agoIt's a shame. I rather like the language, but failing to fix the deployment story for this long is frankly unacceptable.
- casper345 8y agoQuestion: How is python on more mechanical systems, like robotics in such? Will we see a migration there besides web env?
- kjullien 8y agoI learned development with Python (after trying to grasp the concepts of C for a while) and I have to say that alongside .NET it is one of the easiest languages I had the pleasure to work with. So much so that after 10 years of mainly Javascript and Node.js work I have decided to go back to Python simply to make my life easier and be more productive.
- anonu 8y agoThis is a shorter version of this July 19, 2018 article: https://www.economist.com/science-and-technology/2018/07/19/python-has-brought-computer-programming-to-a-vast-new-audience https://www.economist.com/science-and-technology/2018/07/19/...