
A scripting language or script language is a
programming language
A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language.
The description of a programming l ...
that is used to manipulate, customize, and automate the facilities of an existing system.
Scripting languages are usually
interpreted at
runtime rather than
compiled.
A scripting language's
primitive
Primitive may refer to:
Mathematics
* Primitive element (field theory)
* Primitive element (finite field)
* Primitive cell (crystallography)
* Primitive notion, axiomatic systems
* Primitive polynomial (disambiguation), one of two concepts
* Pr ...
s are usually elementary tasks or
API calls, and the scripting language allows them to be combined into more programs. Environments that can be automated through scripting include
application software
Application may refer to:
Mathematics and computing
* Application software, computer software designed to help the user to perform specific tasks
** Application layer, an abstraction layer that specifies protocols and interface methods used in a ...
,
text editor
A text editor is a type of computer program that edits plain text. Such programs are sometimes known as "notepad" software (e.g. Windows Notepad). Text editors are provided with operating systems and software development packages, and can be u ...
s,
web pages,
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
shells,
embedded system
An embedded system is a computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is ''embedded'' ...
s, and
computer game
Video games, also known as computer games, are electronic games that involves interaction with a user interface or input device such as a joystick, controller, keyboard, or motion sensing device to generate visual feedback. This feedbac ...
s. A scripting language can be viewed as a
domain-specific 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 high-level programming languages, as they sometimes 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 in a wider sense, namely, to refer to
dynamic high-level programming languages in general; some are strictly
interpreted languages, while others use a form of compilation.
In this context, the term ''script'' refers to a small program in such a language; typically, contained in a single file, and no larger than a few thousand lines of code.
The spectrum of scripting languages ranges from small to large, and from highly
domain-specific language to
general-purpose programming language
In computer software, a general-purpose programming language (GPL) is a programming language for building software in a wide variety of application domains. Conversely, a domain-specific programming language is used within a specific area. For ex ...
s. A language may start as small and highly domain-specific and later develop into a portable and general-purpose language; conversely, a general-purpose language may later develop special domain-specific dialects.
Examples
*
Bash, an interpreted scripting language for use on
Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
,
GNU and other
Unix-like
A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
s and environments.
*
PowerShell, a scripting language originally for use on
Microsoft Windows but nowadays also installable on
macOS
macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac (computer), Mac computers. Within the market of ...
and
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which i ...
.
*
Rexx,
NetRexx and
Object Rexx are scripting languages based on REXX in
IBM's
VM/SP R3 and are used on a variety of platforms. They are used both for writing new applications and as extension languages for existing applications.
*
sed and
AWK, two text processing languages used mainly in Unix-like environments.
*
Perl
Perl is a family of two High-level programming language, high-level, General-purpose programming language, general-purpose, Interpreter (computing), interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it ...
,
a text processing language that later developed into a general-purpose language, also used as an extension language for various applications.
*
Python, a general-purpose, simplistic scripting language, also used as an extension language.
*
Tcl, a scripting language for Unix-like environments, popular in the 1990s, in conjunction with
Tk, for creating GUI applications.
*
JavaScript
JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
(later:
ECMAScript
ECMAScript (; ES) is a JavaScript standard intended to ensure the interoperability of web pages across different browsers. It is standardized by Ecma International in the documenECMA-262
ECMAScript is commonly used for client-side scriptin ...
), originally a very small, highly domain-specific language, limited to running within a web browser to dynamically modify the web page being shown, that later developed into a widely portable general-purpose programming language.
*
Groovy is a object-oriented scripting language for the Java platform, similar to those of
Python,
Ruby, and
Smalltalk.
*
Visual Basic for Applications, an extension language specifically for
Microsoft Office
Microsoft Office, or simply Office, is the former name of a family of client software, server software, and services developed by Microsoft. It was first announced by Bill Gates on August 1, 1988, at COMDEX in Las Vegas. Initially a ma ...
applications.
*
Lua
Lua or LUA may refer to:
Science and technology
* Lua (programming language)
* Latvia University of Agriculture
* Last universal ancestor, in evolution
Ethnicity and language
* Lua people, of Laos
* Lawa people, of Thailand sometimes referred t ...
, a language designed for use as an extension language for applications in general, and used as such by many different applications.
*
Lisp
A lisp is a speech impairment in which a person misarticulates sibilants (, , , , , , , ). These misarticulations often result in unclear speech.
Types
* A frontal lisp occurs when the tongue is placed anterior to the target. Interdental lispi ...
, a family of general-purpose languages and extension languages for specific applications, e.g.
Emacs Lisp, for the
Emacs
Emacs , originally named EMACS (an acronym for "Editor MACroS"), is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, ...
editor.
Some game systems have been extensively extended in functionality by scripting extensions using custom languages, notably the
Second Life virtual world
A virtual world (also called a virtual space) is a computer-simulated environment which may be populated by many users who can create a personal avatar, and simultaneously and independently explore the virtual world, participate in its activitie ...
(using
Linden Scripting Language) and the
Trainz franchise of Railroad simulators (using TrainzScript). In some games, such as
Wesnoth
''The Battle for Wesnoth'' is a free and open-source turn-based strategy video game with a high fantasy setting, designed by Australian-American developer David White and first released in June 2003. In ''Wesnoth'', the player attempts to buil ...
, users play custom variants of the game defined by user-contributed scripts.
Characteristics
Typical scripting languages are intended to be very fast to learn and write in, either as short source code files or interactively in a
read–eval–print loop
A read–eval–print loop (REPL), also termed an interactive toplevel or language shell, is a simple interactive computer programming environment that takes single user inputs, executes them, and returns the result to the user; a program written ...
(REPL, language shell). This generally implies relatively simple
syntax and
semantics
Semantics (from grc, σημαντικός ''sēmantikós'', "significant") is the study of reference, meaning, or truth. The term can be used to refer to subfields of several distinct disciplines, including philosophy, linguistics and compu ...
; typically a "script" (code written in the scripting language) is executed from start to finish, as a "script", with no explicit
entry point
In computer programming, an entry point is the place in a program where the execution of a program begins, and where the program has access to command line arguments.
To start a program's execution, the loader or operating system passes c ...
.
For example, it is uncommon to characterise
Java
Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
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
This piece of code intended to print "Hello World" does nothing as ''main()'' is ''not declared'' in HelloWorld class, although the one below would be useful.
public class HelloWorld
In the example above, main is defined and so this can be invoked by the launcher, although this still cannot be executed interactively.
In contrast,
Python allows the definition of some functions in a single file, or to avoid functions altogether and use
imperative programming
In computer science, imperative programming is a programming paradigm of software that uses statements that change a program's state. In much the same way that the imperative mood in natural languages expresses commands, an imperative program co ...
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
Bytecode (also called portable code or p-code) is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references (norma ...
. By contrast, the software environment (interpreter) the scripts are written for is typically written in a
compiled language and distributed in
machine code
In computer programming, machine code is any low-level programming language, consisting of machine language instructions, which are used to control a computer's central processing unit (CPU). Each instruction causes the CPU to perform a ver ...
form.
Scripting languages may be designed for use by end users of a program—
end-user development
End-user development (EUD) or end-user programming (EUP) refers to activities and tools that allow end-users – people who are not professional software developers – to program computers. People who are not professional developers can use EUD ...
—or 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
Abstraction in its main sense is a conceptual process wherein general rules and concepts are derived from the usage and classification of specific examples, literal ("real" or " concrete") signifiers, first principles, or other methods.
"An a ...
, a form of
information hiding
In computer science, information hiding is the principle of segregation of the ''design decisions'' in a computer program that are most likely to change, thus protecting other parts of the program from extensive modification if the design decisio ...
, 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, notably the
Google Chrome
Google Chrome is a cross-platform web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macO ...
T-rex game.
History
Early
mainframe computer
A mainframe computer, informally called a mainframe or big iron, is a computer used primarily by large organizations for critical applications like bulk data processing for tasks such as censuses, industry and consumer statistics, enterpris ...
s (in the 1950s) were non-interactive, instead using
batch processing
Computerized batch processing is a method of running software programs called jobs in batches automatically. While users are required to submit the jobs, no other interaction by the user is required to process the batch. Batches may automatically ...
. IBM's
Job Control Language
Job Control Language (JCL) is a name for scripting languages used on IBM mainframe operating systems to instruct the system on how to run a batch job or start a subsystem.
More specifically, the purpose of JCL is to say which programs to run, ...
(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
time-sharing 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.
Multics
Multics ("Multiplexed Information and Computing Service") is an influential early time-sharing operating system based on the concept of a single-level memory.Dennis M. Ritchie, "The Evolution of the Unix Time-sharing System", Communications of ...
calls these ''active functions''.
Louis Pouzin wrote an early processor for command scripts called RUNCOM for
CTSS around 1964.
Stuart Madnick at MIT wrote a scripting language for IBM's
CP/CMS in 1966. He originally called this processor COMMAND, later named
EXEC. Multics included an offshoot of CTSS RUNCOM, also called RUNCOM.
EXEC was eventually replaced by
EXEC 2 and
REXX.
Languages such as
Tcl and
Lua
Lua or LUA may refer to:
Science and technology
* Lua (programming language)
* Latvia University of Agriculture
* Last universal ancestor, in evolution
Ethnicity and language
* Lua people, of Laos
* Lawa people, of Thailand sometimes referred t ...
were specifically designed as general-purpose 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 general-purpose 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 browser
A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used on ...
s typically provide a language for writing extensions to the browser itself, and several standard embedded languages for controlling the browser, including
JavaScript
JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
(a dialect of
ECMAScript
ECMAScript (; ES) is a JavaScript standard intended to ensure the interoperability of web pages across different browsers. It is standardized by Ecma International in the documenECMA-262
ECMAScript is commonly used for client-side scriptin ...
) or
XUL.
Types
Scripting languages can be categorized into several different types, with a considerable degree of overlap among the types.
Glue languages
Scripting is often contrasted with
system programming, as in
Ousterhout's dichotomy
Ousterhout's dichotomy is computer scientist John Ousterhout's categorization that high-level programming languages tend to fall into two groups, each with distinct properties and uses: '' system programming languages'' and '' scripting languag ...
or "
programming in the large and programming in the small". In this view, scripting is
glue code, connecting
software component
Component-based software engineering (CBSE), also called component-based development (CBD), is a branch of software engineering that emphasizes the separation of concerns with respect to the wide-ranging functionality available throughout a give ...
s, and a language specialized for this purpose is a ''glue language''. Pipelines and shell scripting are archetypal examples of glue languages, and
Perl
Perl is a family of two High-level programming language, high-level, General-purpose programming language, general-purpose, Interpreter (computing), interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it ...
was initially developed to fill this same role.
Web development
Web development is the work involved in developing a website for the Internet (World Wide Web) or an intranet (a private network). Web development can range from developing a simple single static page of plain text to complex web application ...
can be considered a use of glue languages, interfacing between a
database
In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases spa ...
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 application development
Rapid application development (RAD), also called rapid application building (RAB), is both a general term for adaptive software development approaches, and the name for James Martin's method of rapid development. In general, RAD approaches to ...
of a solution eventually implemented in another, usually compiled, language.
Glue language examples:
*
AppleScript
AppleScript is a scripting language created by Apple Inc. that facilitates automated control over scriptable Mac applications. First introduced in System 7, it is currently included in all versions of macOS as part of a package of system aut ...
*
ColdFusion
*
DCL
DCL or may refer to:
* 650 in Roman numerals, see 650 (disambiguation)
Computers
* Data Center Linux, see Open Source Development Labs
* Data Control Language, a subset of SQL
* Dialog Control Language, a language and interpreter within AutoC ...
*
Embeddable Common Lisp
*
ecl
*
Erlang
*
EXEC
*
EXEC2
*
JCL
*
CoffeeScript
CoffeeScript is a programming language that compiles to JavaScript. It adds syntactic sugar inspired by Ruby, Python, and Haskell in an effort to enhance JavaScript's brevity and readability. Specific additional features include list comprehen ...
*
Julia
*
JScript and
JavaScript
JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
*
Lua
Lua or LUA may refer to:
Science and technology
* Lua (programming language)
* Latvia University of Agriculture
* Last universal ancestor, in evolution
Ethnicity and language
* Lua people, of Laos
* Lawa people, of Thailand sometimes referred t ...
*
m4
*
Perl
Perl is a family of two High-level programming language, high-level, General-purpose programming language, general-purpose, Interpreter (computing), interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it ...
(5 and
Raku)
*
PHP
PHP is a General-purpose programming language, general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementati ...
*
PowerShell
*
Pure
*
Python
*
Rebol
*
Red
*
Rexx
*
NetRexx
*
Ruby
A ruby is a pinkish red to blood-red colored gemstone, a variety of the mineral corundum (aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sapp ...
*
Scheme
*
Tcl
*
Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
Shell scripts (
ksh,
csh,
bash,
sh and others)
*
VBScript
*
Work Flow Language
*
XSLT
XSLT (Extensible Stylesheet Language Transformations) is a language originally designed for transforming XML documents into other XML documents, or other formats such as HTML for web pages, plain text or XSL Formatting Objects, which may subse ...
Macro
Macro (or MACRO) may refer to:
Science and technology
* Macroscopic, subjects visible to the eye
* Macro photography, a type of close-up photography
* Image macro, a picture with text superimposed
* Monopole, Astrophysics and Cosmic Ray Observat ...
languages exposed to operating system or application components can serve as glue languages. These include
Visual Basic for Applications,
WordBasic,
LotusScriptCorelScript Hummingbird Basic, QuickScript, Rexx
SaxBasic and
WinWrap Basic. Other tools like
AWK can also be considered glue languages, as can any language implemented by a
Windows Script Host engine (VBScript, JScript and VBA by default in Windows and third-party engines including implementations of Rexx, Perl, Tcl, Python, XSLT, Ruby, Modern Pascal, Delphi, and 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 third-party macro tools that glue applications together, in addition to implementations of common glue languages—including
Windows NT
Windows NT is a proprietary graphical operating system produced by Microsoft, the first version of which was released on July 27, 1993. It is a processor-independent, multiprocessing and multi-user operating system.
The first version of Wi ...
,
DOS, and some
Unix shell
A Unix shell is a command-line interpreter or shell that provides a command line user interface for Unix-like operating systems. The shell is both an interactive command language and a scripting language, and is used by the operating system t ...
s, 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
Texas Instruments Incorporated (TI) is an American technology company headquartered in Dallas, Texas, that designs and manufactures semiconductors and various integrated circuits, which it sells to electronics designers and manufacturers globa ...
TI-92, by factory default can be programmed with a command script language. Inclusion of the scripting and glue language
Lua
Lua or LUA may refer to:
Science and technology
* Lua (programming language)
* Latvia University of Agriculture
* Last universal ancestor, in evolution
Ethnicity and language
* Lua people, of Laos
* Lawa people, of Thailand sometimes referred t ...
in the
TI-NSpire
The TI-Nspire is a graphing calculator made by Texas Instruments, which was released in July 2007, notable for featuring a non-QWERTY keyboard and a different key-by-key layout than its predecessors.
Development
The original TI-Nspire ...
series of calculators could be seen as a successor to this. The primary on-board high-level 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 functions—such as graphs, lists, matrices, etc. Third-party implementations of more comprehensive Basic version that may be closer to variants listed as glue languages in this article are available—and attempts to implement Perl, Rexx, or various operating system shells on the TI and HP graphing calculators are also mentioned. PC-based C
cross-compilers
A cross compiler is a compiler capable of creating executable code for a platform other than the one on which the compiler is running. For example, a compiler that runs on a PC but generates code that runs on an Android smartphone is a cross c ...
for some of the TI and HP machines used with tools that convert between C and Perl, Rexx, AWK, and 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.
Editor languages
A number of text editors support macros written either using a macro language built into the editor, e.g.,
The SemWare Editor (TSE),
vi improved (VIM), or using an external implementation, e.g.,
XEDIT, or both, e.g.,
KEDIT. Sometimes text editors and edit macros are used under the covers to provide other applications, e.g., FILELIST and RDRLIST in
CMS .
Job control languages and shells
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 IBM's JCL, or
Job Control Language
Job Control Language (JCL) is a name for scripting languages used on IBM mainframe operating systems to instruct the system on how to run a batch job or start a subsystem.
More specifically, the purpose of JCL is to say which programs to run, ...
, which was used for exactly this purpose). Many of these languages' interpreters double as
command-line interpreter
A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive command (computing), commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invokin ...
s such as the
Unix shell
A Unix shell is a command-line interpreter or shell that provides a command line user interface for Unix-like operating systems. The shell is both an interactive command language and a scripting language, and is used by the operating system t ...
or the MS-DOS
COMMAND.COM
. Others, such as
AppleScript
AppleScript is a scripting language created by Apple Inc. that facilitates automated control over scriptable Mac applications. First introduced in System 7, it is currently included in all versions of macOS as part of a package of system aut ...
offer the use of English-like 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 touch-activated 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
An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
. There are a few exceptions to this limitation. Some GUI scripting languages are based on recognizing graphical objects from their display screen
pixel
In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a raster image, or the smallest point in an all points addressable display device.
In most digital display devices, pixels are the s ...
s. These GUI scripting languages do not depend on support from the operating system or application.
When the GUI provides the appropriate interfaces, as in the IBM
Workplace Shell, a generic scripting language, e.g.
OREXX, can be used for writing GUI scripts.
Application-specific languages
Application specific languages can be split in many different categories, i.e. 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
Video games, also known as computer games, are electronic games that involves interaction with a user interface or input device such as a joystick, controller, keyboard, or motion sensing device to generate visual feedback. This feedbac ...
systems use a custom scripting language to express the programmed actions of
non-player character
A non-player character (NPC), or non-playable character, is any character in a game that is not controlled by a player. The term originated in traditional tabletop role-playing games where it applies to characters controlled by the gamemaster ...
s and the game environment. Languages of this sort are designed for a single application; and, while they may superficially resemble a specific general-purpose language (e.g.
QuakeC, modeled after C), they have custom features that distinguish them.
Emacs Lisp, while a fully formed and capable dialect of
Lisp
A lisp is a speech impairment in which a person misarticulates sibilants (, , , , , , , ). These misarticulations often result in unclear speech.
Types
* A frontal lisp occurs when the tongue is placed anterior to the target. Interdental lispi ...
, contains many special features that make it most useful for extending the editing functions of Emacs. An application-specific scripting language can be viewed as a
domain-specific programming language specialized to a single application.
Extension/embeddable languages
A number of languages have been designed for the purpose of replacing application-specific 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 application-specific 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 general-purpose 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 browser
A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used on ...
s; however, the standardization of the language as
ECMAScript
ECMAScript (; ES) is a JavaScript standard intended to ensure the interoperability of web pages across different browsers. It is standardized by Ecma International in the documenECMA-262
ECMAScript is commonly used for client-side scriptin ...
has made it popular as a general-purpose embeddable language. In particular, the
Mozilla
Mozilla (stylized as moz://a) is a free software community founded in 1998 by members of Netscape. The Mozilla community uses, develops, spreads and supports Mozilla products, thereby promoting exclusively free software and open standards, w ...
implementation
SpiderMonkey is embedded in several environments such as the
Yahoo! Widget Engine
Yahoo Widgets is a discontinued free application platform for Mac OS X and Microsoft Windows, specifically Windows XP, Vista and Windows 7. The software was previously called Konfabulator, but after being acquired by computer services company Yaho ...
. Other applications embedding ECMAScript implementations include the
Adobe
Adobe ( ; ) is a building material made from earth and organic materials. is Spanish for '' mudbrick''. In some English-speaking regions of Spanish heritage, such as the Southwestern United States, the term is used to refer to any kind of ...
products
Adobe Flash
Adobe Flash (formerly Macromedia Flash and FutureSplash) is a multimedia software platform used for production of animations, rich web applications, desktop applications, mobile apps, mobile games, and embedded web browser video players. Fla ...
(
ActionScript
ActionScript is an object-oriented programming language originally developed by Macromedia Inc. (later acquired by Adobe). It is influenced by HyperTalk, the scripting language for HyperCard. It is now an implementation of ECMAScript (meani ...
) and
Adobe Acrobat (for scripting
PDF files).
Tcl was created as an extension language but has come to be used more frequently as a general-purpose language in roles similar to
Python,
Perl
Perl is a family of two High-level programming language, high-level, General-purpose programming language, general-purpose, Interpreter (computing), interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it ...
, and
Ruby
A ruby is a pinkish red to blood-red colored gemstone, a variety of the mineral corundum (aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sapp ...
. 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 general-purpose language. Perl is a general-purpose language, but had the Oraperl (1990) dialect, consisting of a
Perl
Perl is a family of two High-level programming language, high-level, General-purpose programming language, general-purpose, Interpreter (computing), interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it ...
4 binary with
Oracle Call Interface compiled in. This has however since been replaced by a library (Perl Module)
DBD::Oracle
Other complex and task-oriented 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
Maya Embedded Language, or
Blender
A blender (sometimes called a mixer or liquidiser in British English) is a kitchen and laboratory appliance used to mix, crush, purée or emulsify food and other substances. A stationary blender consists of a blender container with a rotating me ...
which uses
Python to fill this role.
Some other types of applications that need faster feature addition or tweak-and-run cycles (e.g.
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
Lua or LUA may refer to:
Science and technology
* Lua (programming language)
* Latvia University of Agriculture
* Last universal ancestor, in evolution
Ethnicity and language
* Lua people, of Laos
* Lawa people, of Thailand sometimes referred t ...
and
Python to lesser-known ones such as
AngelScript and
Squirrel.
Ch is another C compatible scripting option for the industry to embed into C/C++ application programs.
See also
*
Architecture description language
*
Authoring language
*
Build automation
*
Configuration file
In computing, configuration files (commonly known simply as config files) are files used to configure the parameters and initial settings for some computer programs. They are used for user applications, server processes and operating system ...
*
Interpreter directive /
Shebang (Unix)
*
Templating language
References
Further reading
*
External links
*
{{DEFAULTSORT:Scripting Language
Programming paradigms
Articles with example Java code