Economic news

Language programming: Why Python won?

It was that sense that Python was a language whose time had come that also struck van Rossum, as the language began to gain traction in early to mid 1990s.

Van Rossum believes developers were drawn to Python by the same feeling that led him to create it in the first place. They wanted a high-level scripting language that struck a balance between being easy-to-use and capable that didn’t have the limitations of the Unix shell when handling complex logic. They wanted an end to C’s insistence on developers wrangling with memory management and having to reimplement code for the same basic tasks at the start of each project.

Warsaw says Python struck a balance between useability while also not sacrificing what it could do — a balance not really on offer in any major programming language in the early 1990s. “I had been doing a lot of Perl and Tcl and C code, and it just felt like it wasn’t really fun. Python came on the scene, I was like, ‘Wow, this is making programming fun again’,” he says.

What Python offered, and still offers, is clear and unambiguous syntax, where indentations group code into blocks, making the code easier for developers to understand.

Fintan Ryan, research director with the Application Platform Strategies team for analyst firm Gartner, says that clarity played a big role in winning over developers, both now and in the 1990s, even if attributing such importance to indentation has proved divisive. “It offered a very clean syntax. You could enforce this in other languages, but Python enforced it automatically. Some programmers love this, and some hate it,” he says.

growth-major-programming-languages-stack-overflow

 

The fact Python prioritizes clean and readable code is no accident, van Rossum is on record as saying programming languages are as much about communicating ideas between developers as they are about telling a computer what to do.

On top of this readability, Ryan says that from early on Python offered a level of built-in functionality that made it stand out from other languages. “You also had functionalities such as classes and exception handling from the outset. Python also provided support for functions such as lambda, map, and filter, which proved extremely useful in a lot of cases,” he says.

Python may never have existed at all had the popular programming languages in the late ’80s been better, with one of van Rossum’s motivations for creating Python being the incompatibility of the Perl scripting language with the Amoeba distributed computing system he was working on at CWI. “The lucky thing for Python is that Perl was unportable to Amoeba,” he says. “If it had been possible to port Perl to Amoeba, I would have never have thought of starting my own language.”

Even though Python attracted a user base of hard-core fans after its release, in the 1990s Python was still very much a programming language underdog. Van Rossum says the language’s competitors were Tcl/Tk and Perl, both of which shared Python’s goal of being simple-to-use and relatively capable.

“In the ’90s, the top three languages, definitely Perl was number one — the 800-pound gorilla — Tcl/Tk was number two, and Python was a very modest number three,” he says.

oday Python is the fastest-growing programming language in terms of active developers, according to the annual Stack Overflow Developer Survey, one of the most comprehensive snapshots of programming language use available, while Perl has shrunk to the point where it didn’t get a mention in the latest Stack Overflow report.

That explosive growth is captured by the graph below, showing how in recent years views of questions related to Python on Stack Overflow grew far faster than views of questions related to other languages.

So how did Python leapfrog its erstwhile rival, and how to explain the two languages’ vastly different fortunes? Van Rossum believes it has something to do with how easy it is to maintain a code base once it grows beyond a certain size. “People’s experience was that for a 10-line script, Perl is perfect,” he says. “But if you have 500 lines of mainline code and a few thousand lines of library, it requires an enormous amount of discipline to make that code maintainable in Perl. While in Python, even if you don’t have all that much discipline, the code will still be fairly readable and fairly maintainable.”

That combination of Python offering a programming language that is simple to get started with but that is also robust enough to be used to write large applications is what van Rossum attributes to its initial success in the 1990s.

“There were some internet developers — a lot of this was early internet work — who wanted to write larger and larger applications and who appreciated that it was much less effort to write an application in Python than to write it in C, C++, or Java for that matter.”

As use of Python spread in the 1990s, van Rossum, still working at CWI, found his creation was increasingly putting him in contact with people from across the world.

“I had made something, and it was connecting with people all over the world — people in Australia, people in the US, people in other European countries. I was having the time of my life,” he says.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s