There's no doubt that Python, a 25-year-old open source, object-oriented dynamic language, has become a major tool for software developers in recent years. They love its programmer-friendliness, as well as its vast ecosystem of frameworks and libraries.
InfoWorld Editor at Large Paul Krill spoke with Python's creator, Guido van Rossum, a principal engineer at Dropbox, about Python's performance, ecosystem, and prospects for both mobile development and the browser.
Van Rossum: That's still a tough platform to crack for us. Not as bad as the browser platform, as Python is actually capable of running on smartphones of all brands. You just have to find a few people who know exactly how to build a version of Python.
Unfortunately, the standard CPython source code almost, but not quite, compiles to a binary that runs correctly on an Android phone or iPhone. There are a number of people who are really interested in moving that forward and contributing patches and little things like how you check that you're on an Android platform. It's moving forward, though not as fast as I wish it would move forward. But then again, I'm not developing mobile apps myself, so I am not too motivated to dive into that myself. But I'm very happy to see that it's happening.
Van Rossum: There are better goals in life.
InfoWorld: So WebAssembly presents opportunities for Python developers?
Van Rossum: I think it would. There's going to have to be a stage of experimentation where people who are more interested in developing tools than producing applications get a chance of figuring out what the best way is to run Python on top of WebAssembly. Eventually, when those people are successful and they start evangelizing, we can tell regular Python developers, "Now you can also write browser client apps in Python." We're not there yet.
InfoWorld: When I interviewed you in 2012, Python was criticized for performance. You told me at the time it was fast enough. How has performance improved since then?
Van Rossum: Python 3 has actually caught up. Python 3 is significantly faster than it was in 2012. Otherwise, there are specialized versions of Python like PyPy that are still around. There are some new versions of Python interpreters that are working on improving the speed.
It turns out that actually, Python's performance story is not as bad as people make it out to be, and because most of Python is actually implemented in C, there are many things that Python can do just as fast as C. I continue to believe that Python is fast enough for most things that you would want to do with Python.
InfoWorld: Have any specific features been added into Python in the 3.x line to make it faster?
Van Rossum: We have not added features to the language. Behind the scenes, we have made various parts of the language faster; the reference counting, I believe, is a little faster. It's all just tuning of the existing stuff, but as a user you don't notice a difference. There's no recommendation of, "Well, write your code in a different way and then it becomes faster.” That's unnecessary.
InfoWorld: You mentioned PyPy. What is your impression of projects like PyPy or Futhark, which is a functional programming language that puts Python onto GPUs?
Van Rossum: The latter one I've not even heard of. Things like that are usually pretty esoteric. They're really out there for people who are doing cool, crazy stuff that probably isn't directly usable for your typical Python programmer.
But PyPy is pretty mature. If you feel an urgent need for speed in a general-purpose Python program, it is worth seeing if an application actually runs faster with PyPy. You might run into situations where it runs slower, though, because you're using an extension module and going back and forth between the extension module and your Python code is somewhat slower.
If most of what you're doing depends on an extension module anyway, CPython is probably still your friend.
InfoWorld: Are you surprised at the development of all these Python frameworks and things like Futhark that spring up in the Python ecosystem?
Van Rossum: Everybody likes to be part of the winning team, and Python seems to be in general on the way to success if you look at how many conferences there are and how many people come to big conferences like PyCon and EuroPython. It's growth everywhere, that excitement. I'm not surprised that people who are looking for a venue for their specialized project use Python as a starting point, as a support language, or as inspiration.
InfoWorld: Why is Python so popular these days? In language popularity indexes like Tiobe, PyPL, GitHub, and RedMonk, it's doing well.
Van Rossum: It's the ease of learning, the ease of use, and the community that is so open and welcome.
InfoWorld: You've said that you're the guy in charge of Python but there are a lot of other people contributing. How much is from you and how much of it is from other people?
Van Rossum: At this point, and actually for the last five years or more, it's mostly been coming from other people. I occasionally give guidance about whether I think a particular idea is acceptable or not, usually when it comes to syntax that might be added to the language. When it comes to libraries, I rarely bother to interfere. Sometimes I have to tell people to stop arguing and somehow find a way forward through compromise.
My ambition is for the community to sustain itself so that I can actually eventually retire or at least go on long vacations. I'm hoping and expecting that the language will evolve to absorb new ideas that come from other languages or from certain fields of activities.
One thing I want to point out are the SciPy and NumPy movements. Those people are introducing Python as a replacement for MatLab. It's open source, it's better, they can change it. They are taking it to places where I had never expected Python would travel. They have things like the Jupiter Notebooks that show interactive Python in the browser. There is a lot of incredibly cool work that is happening in that area.
Join the CIO Australia group on LinkedIn. The group is open to CIOs, IT Directors, COOs, CTOs and senior IT managers.