The Definition of Scripting

Larry Wall writes about scripting, “I can’t define it, but I’ll know it when I see it.” So I thought I’d throw out my idea of a definition. A scripting language is a programming language that relies on and is designed to run within an ecosystem based on other languages. So Perl 5 and Ruby run within the C/Unix ecosystem, PHP runs within a web server, and Clojure runs within Java.

In contrast, non-scripting languages are designed to be a complete ecosystem on their own. In a non-scripting language, it’s C/Java/Smalltalk/Common Lisp all the way down. (Of course, no language exists in complete isolation, and everything has to be transformed into machine code eventually.)

I’ve always admired Java’s completeness — you can do everything you would ever want to do without leaving the Java world — even while I shun its complexity. Likewise, I admire small, special-purpose languages like AWK that do one thing well. Both approaches have their attractions, but I believe we will always need both. That’s why I’m encouraged by recent efforts to develop scripting languages on the platforms of large-system languages like C# and Java. It’s a recognition that there will never be “one language to rule them all.” I think (hope) we’ll see more task-specific languages integrated with these platforms in the future.

The web already exemplifies this trend, with five or more languages (HTML, CSS, JavaScript, SQL, PHP/Perl/Ruby/…) all working together to produce a single result.