Home  >  Standards  >  features

The World's Most Popular Programming Language Has Fashion and Luck to Thank

| | Comments (12)
AddThis Social Bookmark Button
 

Jean Sammet wrote Computer Languages: History and Fundamentals in 1969. It was a survey of 120 programming languages, some examined in considerable detail. Sammet's book chronicled languages that were designed before the Structured Programming Revolution and the later development of Object-Orientation. The book's cover featured a picture of the Tower of Babel. Many of the bricks in the structure of the tower bore the names of programming languages.



This structure refers to the book of Genesis in which some excellent engineering talent was applied to the task of building a city and a tower with which to unify the world. God observed this and decided man shouldn’t have that much power at his disposal. He scattered their language and stopped the building of their great city in its tracks.

Sometimes this section of Genesis is read as a warning against hubris or as a just-so story explaining why people speak so many languages. Or, depending on your theological persuasion, that the LORD created the I18N Problem to prevent humanity from reaching its potential. But I think its truest interpretation is as a metaphor for programming language design. The principle problem in programming is the management of complexity. If a language does not help us to manage very complex systems in the face of changing requirements, then confusion results, and failure follows.

Beyond the Sammet set, there have been lots of new languages and dialects developed over the past 40 years. We have been programming at a High Level for a very long time. There are obvious efficiencies that would be obtained from the design and adoption of a single, perfect language. We could focus our resources more effectively on training and tool development.

There have been several attempts to build massive, universal languages. They all failed. As a language design grows, increasing its applicability, it becomes more and more complex. Designers who make their language too complex will confuse the language.

So we see instead a large number of more specialized languages. A specialized language will be very effective for a particular range of tasks. And that's good enough. For people who have to accomplish those tasks, having the right language can be, well, a godsend.

A programming language cobbles a model of computation with some sort of expressive syntax. Most languages will have a set of useful values such as numbers and texts (which most languages, strangely, call strings), and operations that mutate and synthesize values and some form of variation or repetition, and some way of packaging operations into more convenient idioms. The variations that are possible are endless.

The art in language design is knowing what to leave out. The features of a good language work together harmoniously. A good language helps us to better understand a problem and to find the best expression of its solution.

A good language is composed of a limited set of features. But there is little agreement on which features are best. Programmers can argue endlessly about features and whether a set of features makes one language better than another. Features matter, but we just don't understand yet how they matter.

Language design has more to do with fashion than technology. It may seem strange that fashion is a major factor in the nerdliest of arts, but it is true. A language with radically different syntax, for example, has no hope of finding broad adoption, regardless of the brilliance of its design. This tends to constrain the rate at which languages evolve.

Just like fashion, a programming language is often a product of its time. The deep problem in language design is not technological, it is psychological. A programming language should equip us with structures that help us to reason more effectively.

Upstarts, in part due to the complexities of modernizing older languages, ultimately replace most successful languages. Remodeled languages rarely match the glory of the original.

Fortran, for example, was once the king of languages. It has been revised several times over the years, but the modernized dialects experience a fraction of the prestige of Fortran IV. Similarly, Pascal was a popular structured programming language, but none of the object oriented dialects ever approached Pascal's glory. Instead, languages tend to be superseded.

Specialized languages are fun to make, which partly explains why there are so many. If a language doesn't get too big, a single designer can manage it. Most languages can be identified with a single designer. Pascal: Wirth. C: Ritchie. C++: Stroustrup. Java: Gosling. C#: Hejlsberg. Rebol: Sassenrath. Python: van Rossum. PHP: Lerdorf. Perl: Wall. Ruby: Matsumoto. Lua: Ierusalimschy. E: Miller. JavaScript: Eich.

Most languages die in obscurity. Only a few are able to build a following beyond a single project or company. And only a very small number of languages become important.

There are two ways that a language becomes important. The first is as a source or proving ground for important ideas. This includes languages like Smalltalk and Scheme which are generally recognized as brilliant, though out of fashion. They have a powerful influence on language designers.

The second way that a language becomes important is by becoming popular.

There are many things that a programmer must consider when selecting a program language unless that programmer is writing for web browsers where the only choice currently is JavaScript.

JavaScript is an astonishing language, in the very worst sense. Its astonishing nature led to a very bad reputation. JavaScript is also coupled with The DOM, a horrendous API. There is a lot of confusion about where JavaScript ends and the DOM begins. There is lots of chatter about improving JavaScript, but that by itself would do little to improve the lives of web developers. The language is burdened with too many features, including many that interact badly or were poorly designed. It is a language that has, as Emperor Joseph would say, too many notes.

So how did a language with such obvious deficiencies become the Sole Programming Language of the Web? Brendan Eich convinced his pointy-haired boss at Netscape that the Navigator browser should have its own scripting language, and that only a new language would do, a new language designed and implemented in big hurry, and that no existing language should be considered for that role.

The Internet Explorer team at Microsoft wanted to capture Netscape's market share, so they carefully reverse engineered Netscape's language, huge hairy warts and all. The other browser makers followed Microsoft's lead. There is no standard that says that a web browser must implement JavaScript; JavaScript is the only language implemented in all popular web browsers. There was no careful review of the language or its problem domain. There was no review of its suitability or the soundness of its design. It was slapped together at Netscape, and then copied elsewhere. Given the process that created JavaScript and made it a de facto standard, we deserve something far worse.

But despite JavaScript's astonishing shortcomings, deep down, in its core, it got something very right. When you peel away the cruft, there is an expressive and powerful programming language there. That language is being used well in many Ajax libraries to manage and augment the DOM, producing an application platform for interactive applications delivered as web pages. Ajax has become popular because JavaScript works. It works surprisingly well.

JavaScript was the world's most misunderstood programming language. Its obvious defects, its unfashionable programming model, intentional mis-positioning at its introduction, and its ridiculous name caused it to be rejected as unworthy by most knowledgeable programmers. But Ajax gave JavaScript a second chance.

Because JavaScript is the language of the web browser, and because the web browser has become the dominant application delivery system, and because JavaScript isn't too bad, JavaScript has become the World's Most Popular Programming Language. Its popularity is growing. It is now being embedded in other applications and contexts. JavaScript has become important.

Take a lesson from JavaScript: It is better to be lucky than smart.

Comments

12 Comments

Nice article, thanks for publishing it.

As for that last line, let me quote Arthur C. Clarke who has just passed away:

"It has yet to be proven that intelligence has any survival value."

hmmmm,

I do not agree with the quote posted by Ignacio. The human race as a species has proven that intelligence as an adaptation certainly has survival value.

But that leads to another point. Computing and most definitely the web as a layer on top have seemed to exhibit very similar behaviors that are found in nature.

One could go as far to say that, programming languages and technologies built with them evolve in a process of natural selection.

Now whether or not you believe in evolution, is not the point of this comment, but for the sake of this point, I will put myself in the shoes of an evolutionary biologist.

In those shoes, I would say that you must look at things from a "genes eye view". If you do, then you will realize that from that view, the only goal is to get yourself copied. Getting copied equals survival.

That could explain the success of Javascript. It is extremely easy to copy and implement. But if you examine even closer you will see that Javascript benefited simply because it was along for the ride.

Javascript's sucess can be directly attributed to it's symbiotic relationship with HTML and the goals of the world-wide web. HTML is a simple declarative language designed to provide the simplest building blocks on which all of the web would be built upon. The fact that from the beginning all HTML came with the ability to: "View Source", and the fact that the source was (relatively) human readable, was the reason it has turned into the foundation of modern day mass communication.

Javascript was always a step more complex than HTML in terms of readability, but it's copyability is just as high.

This is most definitely the reason it was a success in comparison to other languages/runtimes that have blocked source from being copied.

Blocking the source means that you block the ability to have natural selection take place. This makes it much more difficult to evolve a language, and it makes it much more difficult for people to discover a language. Leading inevitably to extinction.

Laurie Gray said:

I love the perspective you present here. Definitely some pretty chewy food for thought!

marshall said:

hmmm, hmmm,

I think of a language like C, or C++, or Java, which are compiled languages encapsulated in binary exe's -- those languages did not succeed because they were easy to copy.

I think they succeeded because they performed the task at a comfortable level -- not too high, not too low (like assembly language). C++ and Java are still today very popular -- NOT because they are "easy to copy", but because they do the tasks necessary.

Ghettoimp said:

"I think of a language like C, or C++, or Java, which are compiled languages encapsulated in binary exe's -- those languages did not succeed because they were easy to copy."

Historically, you could probably argue that C actually was easy to copy.

(1) The language was simple enough that compilers could be written for many different kinds of computers. This meant the language could "spread" to every "continent".

(2) Programs written in C were portable enough to run on many different kinds of computers. This gave a big incentive to developers to write in C. Even today, it's ubiquity often makes it a good choice for many kinds of applications.

(3) Every language of competitive performance was also compiled to machine code, so it certainly wasn't *more* difficult to copy C programs than other programs.

steve said:
I do not agree with the quote posted by Ignacio. The human race as a species has proven that intelligence as an adaptation certainly has survival value.

There is a theory that intelligence is runaway sexual selection, like the peacock's tail.

cjh said:


Tony
hmmmm,

I do not agree with the quote posted by Ignacio. The human race as a species has proven that intelligence as an adaptation certainly has survival value.

Recall that he said this -- I'm sure -- back in the days of the Cold War. It was a humorous way of pointing out that though intelligence may have let us have our way for a few thousand years, there was a pretty good chance the same intelligence would lead to our extinction within a few more years. That would put intelligence's long-term survival value way behind whatever it is that makes cockroaches successful, just to name one species!

woho, I expected a bit of controversy here, and I got it. Sure, human beings may be headed for extinction for the same reason they are dominating the planet today, but in this discussion that is neither here nor there.

In terms of programming languages, it is obvious that many other compiled languages have seen success, and I do not argue that they have not.

Instead, I am trying to explain the strange yet radical success of an inferior language that is javascript. Almost everything about it is imperfect and wrong, but yet it still is very successful.

The point is that it is resilient with changing times, and is easily copyable. I point this out as a reason for it's success, it ability to achieve ubiquity, as opposed to claiming that it is somehow superior. I was examining it from the "gene's eye view"

If we go deeper into the metaphor with biology, I can say that the "phenotype" is able to pass on it's "genotype" which is required for reproduction. Compiled languages do not have the same capability. Instead they survive not by a natural process, but by a manufactured process of trading the source separate from the "phenotype".

Code is traded via Open Source, and code is traded on mailing lists where specialists share with each other how they did what they did. But never do you achieve the copyablility that you do with something like HTML and Javascript. You cannot create something new from the phenotype without reverse engineeering it.

Now, there are many languages that are far superior to Javascript and HTML. I for one am a huge fan of MXML and Actionscript 3. I realize how powerful they are, but I understand that they were not designed to be copied in the way HTML and Javascript are.

They may be powerful tools, but at this stage and examining their implementation, like other compiled languages, they are tools of the elite, not tolls of the masses yet.

Ask yourself, why you would not want to have a "View Source" option for every application that exists. The answer has alot to do with business as much as it has to do with intellectual property. But at the end of the day, it is not that it is superiour, because it is not. It is that it is natively viral.

tndal said:

Glad to hear it!

I keep JavaScript disabled at almost all times while browsing. Glad to see it's such a useful language.

she said:

I want to disagree on a few points (I agree about the rest)

First, Javascript became popular because the www is so important, from A to Z. Take PHP. As a language, I find PHP has very big flaws. But it became popular!

A similar situation accounts for Javascript. Javascript has such a limited scope (I recall wondering... can you create files and dirs with javascript? ;> ) and a narrow focus. Then we have XML. The most horrible way to store structures - and _still_ claim that it is human readable.

Ajax just ties it all together in a bundle, but the inside is still a huge mess. Even being a bad language does not matter, Javascript is ubiquitios and has a good-enough support, so every growth of the www directly helped Javascript.


Second, Javascript in the core only has a few things that are "right", i.e. easy user interaction.
Something like
onClick
is very intuitive and easy.

But lets not be fooled here. Javascript as a language will only have a very narrow focus, and this is my main reason why I dont like it. I dont want to learn countless tools to do a job. I already use Ruby for all my work (and C for the rest where speed is important, or for existing libraries reason), so I am not interested in adding so many layers upon layers onto everything.

If one wants to see the biggest competitor to Javascript, then this is Flash. What Flash - and i dont like that it is not free, open source but has such a huge market share - enables a writer to do, is much more in a consistent manner than any AJAX cruft will ever be able to achieve.

Mark Miller said:

@Tony MacDonell:

I think you make some good points from the biological perspective. However I think Javascript's success has less to do with it being easy to copy. It had more to do with it "hitching a ride" on the web browser. It initially found its usefullness as "glue" between an HTML page and a Java applet. Later came DHTML, and then AJAX. Had the language's scope been narrow, in an area that ended up getting used rarely, it probably would've died. So usefullness was key to its success.

There are plenty of languages that were open for copying, but they're not as popular. Javascript had exclusivity. No other language could run inside the browser like it could, because no others were tried early on.

PHP is another example of a language that's gotten very popular. Again, it "hitched a ride" on the web--on the server side, and was easy to copy. I'm not sure if it was the same situation as Javascript and the browser. What was PHP "shipped with", if anything? Apache?

I think it took the combination of factors (easy-to-copy, and "bundling"). Both were perceived as being part and parcel of the domain in which they dwelled, and they were apparently easy enough to learn.

Another thing I'd add is don't underestimate the willingness of programmers to do gymnastics (ie. hack) with a programming language. Some thrive on it: "Look what I did!" The feat of mastering something that's difficult to deal with seems to impress quite a few. Very few seem to ask, "Uh, okay. Why did you do this with that POS? Wouldn't it have been smarter to do it in something that was designed for what you did?"

"Ah!", the hacker will reply, "But this is the default language for platform X. Me doing this makes me the envy of others, because they can only dream of doing the same thing on platform X. Aren't I smart?"

It's the ethic of using the most readily available material to build whatever it is you need. It's like the pioneers who settled on homesteads on the plains. They built their houses out of sod. Not the best or most appealing material, but it's the most readily available, and relatively cheap to come by.

@marshall:

In the case of C, C++, and Java, I don't think it was just a case of them being easy to copy and doing the jobs necessary. In fact for a long time Java was not easy to copy, because Sun owned the JVM. Remember the trouble Microsoft got in when it tried to copy Java? I'd describe these languages as part of an evolution. It all began with C.

C was originally distributed with Unix, which was a free OS when first released. Unix was largely written in C as well. Unix became very popular at universities, who liked an open source, free OS. If you wanted to understand Unix you had to understand C, so C got learnt. It spread from there.

C++ was an extension to C, adding OOP idioms as a way of dealing with complexity that was cropping up in C programs. Initially it provided a migration path. The first C++ compilers could compile C programs as-is. It came from the same place as C and Unix: AT&T. C++ wasn't really associated with a platform though, just another language (C). I've heard that Microsoft played a big role in popularizing C++, but I don't really know.

Java was another stage in the evolution. There were thorny complexity issues (ie. memory management) cropping up in C++ programs. Java offered to solve them while retaining similar syntax. Ironically I think it was IBM that got Java accepted on the server side for running web sites, and eventually enterprise software. I think the reason Java has been accepted to the degree it has is that IBM successfully linked "Java" and "web" in people's heads, so it became the language people chose for web business apps. They eventually did the same with enterprise systems.

Java is kind of a weird beast to me. It kept the conventions of C++ yet doesn't offer the same power as C++ does. C++ was a language that could run the gamut of high level concepts to low level direct-to-hardware coding. Java did a "bait-and-switch". It offered the "look and feel" of C++, without the power that got programmers into trouble.

Keep in mind that there were a lot of other languages that "could do the job", and were easy to copy, but didn't become as popular. As I said in my reply to MacDonell, C "hitched a ride" on a popular platform: Unix, and thereby became popular itself.

Another example. Part of the popularity of Ruby and Rails can be attributed to the fact that both are distributed on Macintosh computers.

@Douglas: Interesting write-up... though it could use some sort of bibliography for points like this:
"There was no careful review of the language or its problem domain. There was no review of its suitability or the soundness of its design."

@Mark: C+Unix and JavaScript+web sound like good parallels. The hype surrounding Ruby on Rails is a different beast... when I started with it in 2006 it was an enormous pain to install on Mac (just like PHP3 was a pain to install on Windows in 2000). It all comes with Leopard, but the hype has died down. If there is any "bundling" in that realm, it's TextMate+Rails given the screencasts use of that excellent Macintosh editor.

Interesting times to be a web developer. Tools like Jaxer bringing what essentially is Firefox with its head chopped off to the server, or the IronMonkey project that could bring Ruby/Python to the browser in time for Firefox 4.

Leave a comment


Type the characters you see in the picture above.

Related Books

Development Series

Get an overview of the tools and technologies that work together to allow developers to build Rich Internet Applications (RIAs) quickly and easily.

Anatomy of an Enterprise Flex RIA

Archives


 
 


Or, visit our complete archive.  

About This Site

Welcome to the premiere community site for all things RIA sponsored by O'Reilly Media and Adobe Systems Incorporated.

About Us
Meet the Experts
Meet Our Contributors
Send Us Feedback