scripting language a scripting or script language is a programming language that supports scripts programs written for a special runtime environment that automate the execution of tasks that could alternatively be executed onebyone by a human operator scripting languages are often interpreted rather than compiled primitives are usually the elementary tasks or api calls and the language allows them to be combined into more complex programs environments that can be automated through scripting include software applications web pages within a web browser usage of the shells of operating systems os embedded systems as well as numerous games a scripting language can be viewed as a domainspecific language for a particular environment in the case of scripting an application it is also known as an extension language scripting languages are also sometimes referred to as very highlevel programming languages as they operate at a high level of abstraction or as control languages particularly for job control languages on mainframes the term scripting language is also used loosely to refer to dynamic highlevel generalpurpose languages such as perl with the term script often used for small programs up to a few thousand lines of code in such languages or in domainspecific languages such as the textprocessing languages sed and awk some of these languages were originally developed for use within a particular environment and later developed into portable domainspecific or generalpurpose languages conversely many generalpurpose languages have dialects that are used as scripting languages this article discusses scripting languages in the narrow sense of languages for a specific environment the spectrum of scripting languages ranges from very small and highly domainspecific languages to generalpurpose programming languages used for scripting standard examples of scripting languages for specific environments include bash for the unix or unixlike operating systems ecmascript javascript for web browsers and visual basic for applications for microsoft office applications lua is a language designed and widely used as an extension language python is a generalpurpose language that is also commonly used as an extension language while ecmascript is still primarily a scripting language for web browsers but is also used as a generalpurpose language the emacs lisp dialect of lisp for the emacs editor and the visual basic for applications dialect of visual basic are examples of scripting language dialects of generalpurpose languages some game systems notably the second life virtual world and the trainz franchise of railroad simulators have been extensively extended in functionality by scripting extensions linden scripting language and trainzscript in other games like wesnoth the variety of actual games played by players are scripts written by other users characteristics typically scripting languages are intended to be very fast to learn and write in either as short source code files or interactively in a readevalprint loop repl language shell this generally implies relatively simple syntax and semantics typically a script code written in the scripting language is executed from start to finish as a script with no explicit entry point for example it is uncommon to characterise java as a scripting language because of its lengthy syntax and rules about which classes exist in which files and it is not directly possible to execute java interactively because source files can only contain definitions that must be invoked externally by a host application or application launcher public class helloworld public void printhelloworld systemoutprintlnhello world this piece of code intended to print hello world does nothing as main is not declared in helloworld class in contrast python allows definition of some functions in a single file or to avoid functions altogether and use imperative programming style or even use it interactively print hello world this one line of python code prints hello world no declarative statement like main is required here a scripting language is usually interpreted from source code or bytecode by contrast the software environment the scripts are written for is typically written in a compiled language and distributed in machine code form scripting languages may be designed for use by end users of a programenduser developmentor may be only for internal use by developers so they can write portions of the program in the scripting language scripting languages typically use abstraction a form of information hiding to spare users the details of internal variable types data storage and memory management scripts are often created or modified by the person executing them but they are also often distributed such as when large portions of games are written in a scripting language history early mainframe computers in the 1950s were noninteractive instead using batch processing ibms job control language jcl is the archetype of languages used to control batch processing the first interactive shells were developed in the 1960s to enable remote operation of the first timesharing systems and these used shell scripts which controlled running computer programs within a computer program the shell calvin mooers in his trac language is generally credited with inventing command substitution the ability to embed commands in scripts that when interpreted insert a character string into the script louis pouzin wrote an early processor for command scripts called runcom for ctss around 1964 stuart madnick at mit wrote a scripting language for ibms cpcms in 1966 he originally called this processor command later named exec exec was eventually replaced by exec 2 and rexx languages such as tcl and lua were specifically designed as generalpurpose scripting languages that could be embedded in any application other languages such as visual basic for applications vba provided strong integration with the automation facilities of an underlying system embedding of such generalpurpose scripting languages instead of developing a new language for each application also had obvious benefits relieving the application developer of the need to code a language translator from scratch and allowing the user to apply skills learned elsewhere some software incorporates several different scripting languages modern web browsers typically provide a language for writing extensions to the browser itself and several standard embedded languages for controlling the browser including javascript a dialect of ecmascript or xul types glue languages scripting is often contrasted with system programming as in ousterhouts dichotomy or programming in the large and programming in the small in this view scripting is particularly glue code connecting software components and a language specialized for this purpose is a glue language pipelines and shell scripting are archetypal examples of glue languages and perl was initially developed to fill this same role web development can be considered a use of glue languages interfacing between a database and web server but if a substantial amount of logic is written in script it is better characterized as simply another software component not glue glue languages are especially useful for writing and maintaining custom commands for a command shell smaller programs than those that are better implemented in a compiled language wrapper programs for executables like a batch file that moves or manipulates files and does other things with the operating system before or after running an application like a word processor spreadsheet data base assembler compiler etc scripts that may change rapid prototypes of a solution eventually implemented in another usually compiled language glue language examples applescript coldfusion dcl embeddable common lisp ecl erlang jcl coffeescript julia jscript and javascript lua m4 modern pascal perl 5 6 php powershell pure python rebol red rexx ruby scheme tcl unix shell scripts ksh csh bash sh and others vbscript work flow language xslt macro languages exposed to operating system or application components can serve as glue languages these include visual basic for applications wordbasic lotusscript corelscript hummingbird basic quickscript saxbasic and winwrap basic other tools like awk can also be considered glue languages as can any language implemented by an windows script host engine vbscript jscript and vba by default in windows and thirdparty engines including implementations of rexx perl tcl python xslt ruby modern pascal delphi c a majority of applications can access and use operating system components via the object models or its own functions other devices like programmable calculators may also have glue languages the operating systems of pdas such as windows ce may have available native or thirdparty macro tools that glue applications together in addition to implementations of common glue languagesincluding windows nt msdos and some unix shells rexx modern pascal php and perl depending upon the os version wsh and the default script engines vbscript and jscript are available programmable calculators can be programmed in glue languages in three ways for example the texas instruments ti92 by factory default can be programmed with a command script language inclusion of the scripting and glue language lua in the tinspire series of calculators could be seen as a successor to this the primary onboard highlevel programming languages of most graphing calculators most often basic variants sometimes lisp derivatives and more uncommonly c derivatives in many cases can glue together calculator functionssuch as graphs lists matrices etc thirdparty implementations of more comprehensive basic version that may be closer to variants listed as glue languages in this article are availableand attempts to implement perl rexx or various operating system shells on the ti and hp graphing calculators are also mentioned pcbased c crosscompilers for some of the ti and hp machines used in conjunction with tools that convert between c and perl rexx awk as well as shell scripts to perl modern pascal vbscript to and from perl make it possible to write a program in a glue language for eventual implementation as a compiled program on the calculator job control languages and shells shell script a major class of scripting languages has grown out of the automation of job control which relates to starting and controlling the behavior of system programs in this sense one might think of shells as being descendants of ibms jcl or job control language which was used for exactly this purpose many of these languages interpreters double as commandline interpreters such as the unix shell or the msdos commandcom others such as applescript offer the use of englishlike commands to build scripts gui scripting with the advent of graphical user interfaces a specialized kind of scripting language emerged for controlling a computer these languages interact with the same graphic windows menus buttons and so on that a human user would they do this by simulating the actions of a user these languages are typically used to automate user actions such languages are also called macros when control is through simulated key presses or mouse clicks as well as tapping or pressing on a touchactivated screen these languages could in principle be used to control any gui application but in practice their use is limited because their use needs support from the application and from the operating system there are a few exceptions to this limitation some gui scripting languages are based on recognizing graphical objects from their display screen pixels these gui scripting languages do not depend on support from the operating system or application applicationspecific languages application specific languages can be split in many different categories ie standalone based app languages executable or internal application specific languages postscript xml gscript as some of the widely distributed scripts respectively implemented by adobe ms and google among others include an idiomatic scripting language tailored to the needs of the application user likewise many computer game systems use a custom scripting language to express the programmed actions of nonplayer characters and the game environment languages of this sort are designed for a single application and while they may superficially resemble a specific generalpurpose language eg quakec modeled after c they have custom features that distinguish them emacs lisp while a fully formed and capable dialect of lisp contains many special features that make it most useful for extending the editing functions of emacs an applicationspecific scripting language can be viewed as a domainspecific programming language specialized to a single application extensionembeddable languages a number of languages have been designed for the purpose of replacing applicationspecific scripting languages by being embeddable in application programs the application programmer working in c or another systems language includes hooks where the scripting language can control the application these languages may be technically equivalent to an applicationspecific extension language but when an application embeds a common language the user gets the advantage of being able to transfer skills from application to application a more generic alternative is simply to provide a library often a c library that a generalpurpose language can use to control the application without modifying the language for the specific domain javascript began as and primarily still is a language for scripting inside web browsers however the standardisation of the language as ecmascript has made it popular as a generalpurpose embeddable language in particular the mozilla implementation spidermonkey is embedded in several environments such as the yahoo widget engine other applications embedding ecmascript implementations include the adobe products adobe flash actionscript and adobe acrobat for scripting pdf files tcl was created as an extension language but has come to be used more frequently as a generalpurpose language in roles similar to python perl and ruby on the other hand rexx was originally created as a job control language but is widely used as an extension language as well as a generalpurpose language perl is a generalpurpose language but had the oraperl 1990 dialect consisting of a perl 4 binary with oracle call interface compiled in this has however since been replaced by a library perl module dbdoracle other complex and taskoriented applications may incorporate and expose an embedded programming language to allow their users more control and give them more functionality than can be available through a user interface no matter how sophisticated for example autodesk maya 3d authoring tools embed the mel scripting language or blender which uses python to fill this role some other types of applications that need faster feature addition or tweakandrun cycles eg game engines also use an embedded language during the development this allows them to prototype features faster and tweak more freely without the need for the user to have intimate knowledge of the inner workings of the application or to rebuild it after each tweak which can take a significant amount of time the scripting languages used for this purpose range from the more common and more famous lua and python to lesserknown ones such as angelscript and squirrel ch is another c compatible scripting option for the industry to embed into cc application programs list of scripting languages architecture description language authoring language build automation configuration file interpreter directive shebang unix templating language barron david william 2001 the world of scripting languages isbn0471998869 wikimedia commons has media related to scripting languages patterns for scripted applications at the wayback machine archived october 10 2004 common development scenarios vtetypes of programming languages actorbased array aspectoriented classbased concatenative concurrent dataflow declarative domainspecific dynamic esoteric eventdriven extensible functional imperative logic macro metaprogramming multiparadigm objectbased objectoriented pipeline procedural prototypebased reflective rulebased scripting stack based synchronous templating assembly compiled interpreted machine lowlevel highlevel very highlevel first generation second generation third generation fourth generation fifth generation nonenglishbased visual 