Scripting language
From Wikipedia, the free encyclopedia
- "Scripting" redirects here. For other uses, see script.
Scripting languages, also called script languages, are programming languages that control applications. Scripts are executed directly from their source code, which are generally text files containing language specific markup.[1][2] Thus, "scripts" are often treated as distinct from "programs", which execute independently from any other application.
The name "script" is derived from the written script of the performing arts, in which dialogue is set down to be spoken by human actors. Early script languages were often called batch languages or job control languages. Such early scripting languages were created to shorten the traditional edit-compile-link-run process.
Contents |
[edit] Description
Computer languages are created for varying purposes and tasks — different kinds and styles of programming. One common programming task is known as scripting, or connecting pre-existing components to accomplish a new related task. Those languages which are suited to scripting are typically called scripting languages. Many languages for this purpose have common properties: they favor rapid development over efficiency of execution; they are normally implemented with interpreters rather than compilers; and they are strong at communicating with program components written in other languages.
Many scripting languages emerged as tools for executing one-off tasks, particularly in system administration. One way of looking at scripts is as "glue" that puts several components together; thus they are widely used for creating graphical user interfaces or executing a series of commands that might otherwise have to be entered interactively through keyboard at the command prompt. The operating system usually comes with at least one shell program that offers some type of scripting language by default, widely known as a shell script.
Other scripting languages are oriented toward empowering end users to write and debug short, simple, and possibly domain-specific programs. One aim of the scripting language is to insulate the user from the intricacies of more formal development and from usage of programming tools developed for an entirely different class of developer. Another aim of the scripting language is to make it easy for a user with domain knowledge (an engineer, statistician, economist, etc.) to accomplish given tasks.
Scripts are typically stored only in their plain text form and interpreted, or compiled each time prior to being invoked. If a compiler has been developed for the language, the scripts can also be stored in their compiled form, but this is uncommon.
Some scripting languages are designed for a specific domain, but often it is possible to write more general programs in that language. In many large-scale projects, a scripting language and a lower level programming language are used together, each lending its particular strengths to solve specific problems. Scripting languages are often designed for interactive use, having many commands that can execute individually, and often have very high level operations (for example, in the classic UNIX shell (sh), most operations are programs themselves).
Such high level commands simplify the process of writing code. Programming features such as automatic memory management and bounds checking can be taken for granted. In a 'lower level' or non-scripting language, managing memory and variables, and creating data structures tends to consume more programmer effort and lines of code to complete a given task, but the programmer has more fine-grained control. High level languages typically have less flexibility to optimize a program for speed or to conserve memory.
For the reasons noted above, it is usually faster to program in a scripting language, and script files are typically much smaller than, for example, equivalent C program files. The flip side can be a performance penalty: scripting languages, often interpreted, may be significantly slower to execute and might consume more memory when running. In some cases, however, e.g. with small scripts of some tens of lines, the write-time advantage far outweighs the run-time disadvantage. Also, this argument gets stronger with rising programmer salaries and falling hardware costs.
However, the boundary between scripting languages and regular programming languages tends to be vague, and is blurring ever more with the emergence of new languages and integrations in this fast-changing area. In some scripting languages, an experienced programmer can accomplish a good deal of optimization if they choose. And, in general, it is possible to write a script in any language (including C or assembly language). This is not recommended, however, for scripting languages whose interpreters are to be marketed, such as languages for macros or for web development.
[edit] Types of scripting languages
[edit] 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. Many of these languages' interpreters double as command line interfaces such as the Unix shell or the MS-DOS COMMAND.COM. Others, such as AppleScript, add scripting capability to computing environments lacking a command-line interface.
- 4NT
- AppleScript
- ARexx (Amiga Rexx)
- bash
- csh
- Ch (C Compatible shell)
- DCL (on OpenVMS)
- JCL
- JScript via Windows Script Host
- ksh
- cmd.exe (Windows NT, Windows CE, OS/2)
- COMMAND.COM (DOS, Windows 9x)
- REXX
- Macro Scheduler
- tcsh
- thinBasic
- sh
- VBScript via Windows Script Host
- Winbatch
- Windows PowerShell
- Windows Script Host
- zsh
- Jake
[edit] GUI Scripting
With the advent of Graphical user interfaces came a specialized kind of scripting language for controlling a computer. These languages interact with the same graphic windows, menus, buttons, and so on that a system generates. These languages are typically used to automate repetitive actions or configure a standard state. In principle, they could be used to control any application running on a GUI-based computer; but, in practice, the support for such languages depend on the application and operating system. Such languages are also called "macro languages" when control is through keyboard interaction
[edit] Application-specific languages
Many large application programs 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 non-player characters 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.
- Action Code Script
- ActionScript
- AutoLISP
- BlobbieScript[1]
- Emacs Lisp
- Game Maker Language
- Hscript
- HyperTalk
- iMacros Web Browser Macro Language
- IPTSCRAE
- Linden Scripting Language
- Lingo
- LotusScript
- MATLAB
- MAXScript
- Maya Embedded Language
- mIRC Scripting Language
- NWscript
- Rhinoscript
- QuakeC
- UnrealScript
- Vim Scripting Language
- Visual Basic for Applications
- ZZT-oop
[edit] Web browser
An important type of application-specific scripting language is one used to provide custom functionality to web pages.
[edit] Text processing languages
The processing of text-based records is one of the oldest uses of scripting languages. Many, such as Unix's awk and, later, Perl, were originally designed to aid system administrators in automating tasks that involved Unix text-based configuration and log files. Perl is a special case -- originally intended as a report-generation language, it has grown into a full-fledged applications language in its own right.
[edit] General-purpose dynamic languages
Some languages, such as Perl, began as scripting languages but were developed into programming languages suitable for broader purposes. Other similar languages -- frequently interpreted, memory-managed, or dynamic -- have been described as "scripting languages" for these similarities, even if they are more commonly used for applications programming. They are usually not called "scripting languages" by their own users.
- APL
- Boo
- Dylan
- Ferite
- Groovy
- Io
- Lisp
- Lua
- MUMPS (M)
- newLISP
- Nuva
- Perl
- PHP
- Python
- Ruby
- S-Lang
- Script.NET
- Scheme
- Smalltalk
- SuperCard
- Tcl (Tool command language)
- thinBasic
- Revolution
[edit] 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 serve the same purpose as application-specific extension languages but with the advantage of allowing some transfer of skills from application to application.
- Ch (C/C++ interpreter)
- ECMAScript a.k.a. DMDScript, JavaScript, JScript
- EOS Scripting Language
- Falcon
- Ferite
- GameMonkeyScript
- Guile
- ICI
- Lua
- Pawn
- Python
- RBScript (REALbasic Script)
- S-Lang
- Squirrel
- Tcl
- Windows PowerShell
- Z-Script
JavaScript began as and primarily still is a language for scripting inside of web browsers; however, the standardization of the language as ECMAScript has made it popular as a general purpose 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 general purpose language in roles similar to Python, Perl, and Ruby.
[edit] Others
- AngelScript
- BeanShell
- CobolScript
- Escapade (server side scripting)
- Euphoria
- F-Script
- Generalized Automation Language (GAL)
- Gui4Cli
- haXe
- Io
- KiXtart
- KonsolScript
- MillScript
- Mondrian
- Object REXX
- Petriscript
- Pike
- Pikt
- Pliant
- REBOL
- ScriptBasic
- Shorthand Language
- Simkin
- Sleep
- StepTalk
- Visual DialogScript
[edit] See also
- Domain-specific programming language
- List of programming languages
- Macro and preprocessor languages
- Ousterhout's dichotomy
- Shebang (Unix)
- Web template languages
[edit] References
- ^ "scripting language" A Dictionary of Computing. (Oxford University Press, 2004) Oxford Reference Online [Accessed 6 November 2006] <http://www.oxfordreference.com/views/ENTRY.html?subview=Main&entry=t11.e4636>
- ^ "CGI (Common Gateway Interface)." World of Computer Science. Ed. Brigham Narins. (Detroit: Gale, 2002) Science Resource Center. [Accessed 06 November 2006] <http://0-galenet.galegroup.com.sable.jefferson.lib.co.us:80/servlet/SciRC?ste=1&docNum=CV2424500109>
[edit] External links
- A study of the Script-Oriented Programming (SOP) suitability of selected languages – from The Scriptometer.
- A Slightly Skeptical View on Scripting Languages by Dr. Nikolai Bezroukov
- Scripting: Higher Level Programming for the 21st Century by John K. Ousterhout
- Are Scripting Languages Any Good? A Validation of Perl, Python, Rexx, and Tcl against C, C++, and Java (PDF) — 2003 study
- Scripting on the Java platform - JavaWorld
Types of Programming languages |
|---|
| Array · Assembly · Compiled · Concurrent · Curly bracket · Data-oriented · Data-structured · Dataflow · Declarative · Domain-specific · Esoteric · Extension · Functional · Imperative · Interpreted · Logic · Machine · Macro · Metaprogramming · Multi-paradigm · Non-English-based · Object-oriented · Off-side rule · Procedural · Prototype-based · Reflective · Rule-based · Scripting · Synchronous · Visual |
cs:Skriptovací jazyk da:Script-sprog de:Skriptsprache es:Guión (informática) fr:Langage de script id:Bahasa skrip it:Scripting nl:Scripttaal ja:スクリプト言語 ko:스크립트 언어 no:Skriptspråk pl:Język skryptowy pt:Linguagem de computador interpretada ru:Скриптовый язык sk:Skriptovací jazyk fi:Komentosarjakieli sv:Skriptspråk zh:脚本语言

