Why new programming languages succeed -- or fail

What sets successful programming languages apart?

There are so many programming languages available today that it's almost impossible to keep track of them all. You've never heard of most of them. But why not? Why do some languages gain mainstream recognition while others don't?

I became interested in this question after reading a blog post by Cristina Videira Lopes, who asks whether there's still research to be done in programming languages. Lopes observes that few successful modern languages have roots in academia. An academic herself, she's naturally dismayed.

[ Find out which 10 experimental languages could shake up IT, learn which 11 programming trends are on the rise, verse yourself in the 12 programming mistakes to avoid, and test your programming smarts with our programming IQ test: Round 1 and Round 2. | Keep up on key application development insights with the Fatal Exception blog and Developer World newsletter. ]

Should she be? As Lopes points out, these days almost anyone can create a language -- and has, from giant corporations to humble hobbyists. Creating a programming language is no longer a big deal, the way it was in the 1970s and earlier. Still, few of these new languages truly succeed. Most remain pet projects or experimental curiosities.

Why? How does a programming language become successful, and what separates the successful ones from the obscure ones? A quick study of some good performers from the past reveals a few clues.

Successful languages are familiar

The languages we have now work well enough. Few developers want to relearn the basics from scratch. For this reason, new languages shouldn't stray too far from what has come before. A novel standard library is usually OK, but the core grammar should feel familiar.

That means new languages should probably be at least a little C-like. Doubtless that will disappoint those who hate C's curly braces and cryptic operators. But 35 years of C -- followed by C++, Java, JavaScript, and countless other C-like dialects -- means you'll scarcely find a programmer today who doesn't grok C's idioms.

Some modern languages have chosen a different path, such as Python. But Python's unique syntax is one of its major features. It's different intentionally and for good reasons. Not every oddball language can say the same.

Furthermore, new languages should support familiar programming styles. It's OK to innovate, but not at the expense of well-known practices. A language that doesn't offer some degree of object orientation won't get far in today's world, for example.

When introducing new concepts, baby steps are best. Several mainstream languages have begun borrowing ideas from functional programming, such as closures and high-order functions, to much acclaim. Still, pure functional languages remain unpopular. Developers like innovative ideas, but they don't like being forced out of their comfort zones.

Successful languages are open source

Forget about proprietary languages. Those days are over. Visual Basic lumbers on, but in my recent survey of new, cutting-edge languages, all of them were open source -- including F# from Microsoft.

Modern developers don't like it when a single vendor wields too much control over a language. Open source gives them the assurance that the code they write today can't be made obsolete tomorrow by changes to the tools, language, or license.

But open source benefits language designers, too. Unlike most kinds of software, compiler users are all developers, by definition. Any of them could improve the language and its tools, given the chance. Outside contributions can be especially helpful in fleshing out a language's standard library, where Java has a long head start.

This isn't to say there's no money in programming languages. Free C and C++ compilers have been around for decades, yet Intel still does good business with its high-performance optimizing compilers. But that only works for established languages. A new language that wants to win an audience today must first be freely available and completely open. The market for "professional" tools comes later.

Successful languages have a niche

Languages such as C++ and Java have become successful largely by being jacks-of-all-trades. Whatever your specialty as a developer, these languages have something to offer you.

But that's also what makes them hard to displace. We already have one Java -- do we need another? Because the inertia of these established languages is so great, new general-purpose languages seldom fare as well as those that carve out a specific niche.

For example, Perl started out as a kind of juiced-up shell-scripting tool for sys admins. Later, its rich text-processing tools made it ideal for CGI scripts, and it grew from there.

Similarly, when Ruby began it was essentially a more powerful Perl. That was fine, but Ruby didn't really take off until the Rails framework made it a hot tool for building Web applications.

C#'s niche is Windows development, like Visual Basic before it. But being a vendor-specific language only works when you have a huge installed base, as Windows does. The vendor-specific approach, by contrast, isn't delivering for Google's languages.

Of the 10 cutting-edge languages I looked at, almost all of them cater to some specific problem area. Some of them were designed for Web applications. Others tackle the thornier problems of parallel computing. Still others target the sciences. None of them aims to be a drop-in replacement for the general-purpose languages we already have.

Successful programming languages need a little bit of luck

Of course, some people say we don't need any more programming languages at all. I disagree. But it seems clear that the mainstream won't accept just any language. To be successful, a new language has to be both familiar and innovative -- and it shouldn't try to bite off more than it can chew.

As for why academia doesn't produce more languages, it may just be the nature of the beast. Stuffy, prescriptive languages tend to turn casual developers off -- take Ada, for instance. As Lopes acknowledges, the first versions of some of the most popular languages were slapped together in a month.

At least part of the formula for success seems to be pure luck, like a band getting its big break. But it also seems much easier for a language to shoot itself in the foot than to skyrocket to stardom.

Whatever the key to success may be, as long as there remain people who are passionate about programming languages (as Lopes is), new ones will keep being born. Whether they ever leave the cradle, on the other hand, is another matter.

This article, "Why new programing languages succeed -- or fail," originally appeared at InfoWorld.com. Follow the latest news in programming at InfoWorld.com. For the latest business technology news, follow InfoWorld.com on Twitter.

Copyright © 2012 IDG Communications, Inc.