What is “scripting language”? This is a vague question that contains two terms, “scripting” and “language,” derived from fields unrelated to computers. The meaning in which these terms are used by many people is vague. Even a word as simple as “language” can easily be misused. For example, VBScript, VB, and VBA are grammatically and practically the same language in terms of the semantics used, and VBScript is somewhat like a simplified pidgin1 of VB.
The notion of scripting (writing scripts) works quite well if one understands a script as a theatrical script. Although the script is exhaustive, the elaboration of performance details is left to the acting actors and director. Unfortunately, the definition of scripting languages cannot be narrowed down in this way: by manipulating applications, any lower-level language can be used as a scripting language!
Scripting languages are quickly becoming common implementation languages for many areas, shining where developer time is more important than runtime (and even where runtime is important; for example, thanks to built-in high-level operations, the speed of programs written in Python is the same, or even faster, than programs written in Java). Many people now prefer to use the designation “dynamic languages” instead of “scripting languages”, citing the lack of compile-time type control2. What is the place of scripting languages in modern computing circles?
Scripting languages allow developers to link together different software packages, and to reconcile the resulting systems.
Increasingly, scripting languages themselves are being used as full-fledged underlying tooling platforms. For example, many large commercial Internet applications are now predominantly programmed in Perl, Python or PHP.
Naturally, scripting languages are used to automate system administration tasks.
It is possible that interpreted or operatively compiled languages will increasingly replace precompiled languages. Compiling will eventually be regarded simply as an optimization tool (which it actually is), the use of which in all cases is hardly reasonable. It will still be useful for sending off-line code outside the environment you control, but compilation will increasingly be seen simply as a way of packaging. On the other hand, the line between compilation and interpretation, which has always been a bit arbitrary, will blur even more. The Perl language already has an operational compilation phase before interpretation. The future will be platform compatibility, so compilers will increasingly target abstract “virtual machines” (like Sun’s JVM or Microsoft’s CLR) that are layered over hardware. At what point in your programming do you compile or interpret? And does it matter?
Dynamic languages as the dominant implementation languages in many areas can overtake Java and C++ over time. Moore’s Law3 is on the side of dynamic languages.
Static languages try to dot all the i’s at compile time. For a long time, developers believed that the type safety of static languages meant greater reliability of their codes. Increasingly, however, developers are coming to the conclusion that this is not the case. Of course, it is theoretically possible to have a variable named “UserName”, but discover at runtime that it refers to an object of the “OrderName” class. In practice, however, this is still unlikely.
What is the attraction of scripting languages?
Scripting languages have a more complex toolkit and support more advanced programming techniques. For example, Perl’s data sorting capabilities are built right into the language. The fact that all the basic programming tools are built into the language eliminates the need to create them yourself and means that less code needs to be written to solve a particular problem, which increases developer productivity.
Scripting languages allow for quick code refinement without the annoying waste of time waiting for compilation to finish.
The number of people who do not have the training that traditional computer professionals have, but who can get down to writing scripts, has increased by an order of magnitude. In other words, programming in scripting languages is easier to learn. It takes more experience to become an average C++ programmer than to become an average PHP programmer.