Scripting languages, sometimes called “dynamic” languages, have become all the rage, in part because they let developers get a lot of work done with comparatively little code. This “bang for the buck” derives from new approaches that push more of the work onto the compiler and runtime environment -- such as deriving a variable’s type by its value -- in addition to special shortcuts for frequently performed actions.
Scripting languages, including Perl, PHP, and Python, have another aspect in common: They are almost universally open source. In many areas, the difference between open and closed source might not be important, but it appears to be critical in scripting languages. And, curiously, this aspect isn’t due to open source’s agility in fixing flaws, but rather to its capability to create community -- that is, a group of users who rely on the language and promote it actively.
A dramatic example of the importance of open source can be seen by comparing the fates of two scripting languages loosed on the world at roughly the same time: Ruby and NetRexx. NetRexx was designed by IBM, based in part on Big Blue’s successful mainframe scripting tool, Rexx. It runs interpretively or can be compiled to Java bytecodes. As a language, NetRexx is highly productive and easy to learn, with numerous elegant constructs. Because it compiles to Java bytecodes, all Java libraries can be accessed from NetRexx, plus it enjoys the performance benefits of the Java Virtual Machine.
Ruby, on the other hand, is purely interpretive; it has no virtual machine and, so, runs slowly. The language itself has elegant points, but much of its advantage comes from the use of nonintuitive syntactical elements, derived in part from Perl’s shorthand syntax. NetRexx and Ruby have another important aspect in common: They are both available for free.
So, which of these two languages is more successful: the fast, elegant NetRexx or the less intuitive and far slower Ruby? Contrary to what one may expect, Ruby is flying high today -- NetRexx is nearly dead.
The key reason, I believe, is that Ruby is open source and NetRexx is not. The result is that Ruby was able to build an active developer community -- especially in Japan, where it was created and has been popular for a decade. Ruby gathered steam until David Heinemeier Hansson wrote Ruby on Rails, a wildly popular Web application framework. Rails is Ruby’s killer app. It is a paragon of design elegance and has guaranteed Ruby an enduring role. Meanwhile, NetRexx limps along untended and friendless, despite its great merit. Had IBM open sourced it, scripting today might be wholly different.
Open source alone is certainly no guarantor of a language’s success. Indeed, there are many open source languages with no hope of success. And although open source alone is not sufficient, it is necessary. Without it -- and lacking the resources of a Microsoft to create community -- few new languages will likely ever reach the needed critical mass of users and evangelists.