FYI.

This story is over 5 years old.

Tech

What It Means To Be a 'Popular' Programming Language

Alternately, what does it mean for a hammer to be the most popular tool?

I have fairly worthless Google Alert set up for "programming language." What it yields on a daily basis generally falls into two related camps: "tech beat business news reporter discusses programming languages as though they were brands of cereal" and "popular programming languages." Both are premised on the notion of a "favorite" programming language, as though everyday programming language usage is dictated by what programmers are really feeling at any given point in time.

Advertisement

It's not unreasonable to think this way, to an extent. If you see a programming language popularity ranking like Stack Overflow's annual developer survey and see that JavaScript is at the top, you might reasonably conclude that developers are into JavaScript more than any other programming language—that is, developers are selecting JavaScript from a pool of options based on preference. Like cereal.

But programming languages aren't cereal. They're tools. What does it mean for a hammer to be the most popular tool at a construction site? That workers like hammering nails more than they like cutting wood or pouring concrete?

Well, no. It means that there are more nails to pound. A lot of people like JavaScript for sure (even me!), but its popularity has much more to do with its current utility. Web browsers (and now servers, via Node.js) feature engines for interpreting JavaScript and so JavaScript is the default programming language for web applications. If web development weren't popular—especially so among Stack Overflow users—then we would see a different ranking.

Same thing goes for Swift. The aforementioned Google Alert has been handily monopolized by the Swift programming language since I set it up a year or so ago. Swift hype is actually worth its own post, but, for now, we can say the same thing as we said for JavaScript. It's another tool, albeit a tool with the backing of a shrewd corporate sponsor. The job in this case is developing iOS applications, for which Swift is now the default/requisite programming language.

Advertisement

No shit Swift is popular/becoming more popular. It's a new language, for one thing. But it's popularity is tightly bound to the popularity of developing apps for iOS. Which is pretty popular!

To be sure, some languages do well as multi-tools and are more general-purpose than others. Most languages aren't content to exist solely within specific domains, but this is especially true of languages like Python and Java. With Python, it's possible and even reasonable to run single Python commands via the Python interpreter while also building vast applications with the language. Among other things, I've used it to write full-stack web applications, web scrapers, RESTful APIs, and cheap Twitter scripts. I've also used it for signal processing. In Python, it's all pretty natural.

Finally, though it may not be the factor determining the relative popularity of programming languages, there is such a thing as a favorite language. Obviously. I have one or maybe three. I had to think about it for a while.

I can't really separate the idea of having a favorite programming language from the idea of having a favorite programming language for some particular programming domain (scientific programming, web programming, systems programming, cloud programming, etc). So, I guess the way to reduce it is to find the most general programming domain (the most general for), which should yield the most general favorite programming language. Maybe I'm overthinking it. IDK.

Advertisement

It just feels like a very pure way of expressing algorithms—connecting thoughts to whiteboard to code.

In any case, my favorite programming language is the one that I like the most for implementing general computer science algorithms—programming interview-type stuff like efficiently finding prime numbers or computing shortest paths in graphs or sorting arrays. Here, C++ kind of just flows out of me. It's the language I use for Hackerrank challenges/CodeFights, though I rarely even use it in school anymore or elsewhere in the "real-world." C++ not infrequently invades my dreams.

Does that mean I like it though? I guess I do. It's fast and can be very lean when it needs to be. There's a naturalness to C++, both to writing it and to how it actually works on a machine. It just feels like a very pure way of expressing algorithms—connecting thoughts to whiteboard to code.

That's a pretty oatmeal answer to the favorite-programming-language question, but whatever. I'm always learning new languages and getting excited about new languages. Right now, it's Scala. Scala is a language that both extends the Java language and is built to extend itself in programmer-defined ways. It's a language for building a language, which is pretty wild. I'm looking forward to really getting my head around the thing. A tool for making tools. That's exciting.

To circle back around to a point I've touched on a few times on Motherboard, knowing a programming language isn't anything like knowing how to program a computer. The algorithms are surprisingly uninterested in the tools wielded by programmers. This is sort of what I'm saying about C++: It's the language that, to me, most feels like the the abstract "whiteboard" process of programming. I guess that's a bit like saying my favorite programming language is no language at all.