Scripting programming language

Scripting programming languages (commonly called scripting languages or script languages) are computer programming languages designed for "scripting" the operation of a computer. Early script languages were often called batch languages or job control languages.

In computer applications, a script, roughly speaking, is a computer program that automates the sort of task that a user might otherwise do interactively at the keyboard. A shell script often consists largely of the sort of commands that might be typed at a command prompt, or in a word processing program a user might write a script that would combine a sequence of editing tasks that the user expects to perform repeatedly. Many such languages are quite sophisticated, and have been used to write elaborate programs, which are often still called scripts even if they go well beyond automating simple sequences of user tasks.

Contents

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 diverse 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 often implemented with interpreters rather than compilers; and they are strong at communication 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. Scripts are typically stored only in their plain text form (as ASCII) and interpreted, or (as with Perl) compiled each time they are invoked.

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 nonscripting language, managing memory and variables and creating data structures tends to consume more programmer effort and lines of code to complete a given task. In some situations this is well worth it for the resulting fine-grained control. The scripter typically has 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, say, equivalent C program files. The flip side can be a performance penalty: scripting languages, often interpreted, may be significantly slower to execute and may consume more memory when running. In many relevant 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). In most modern systems, the latter case is very seldom recommendable, since one or more suitable script languages is usually available.

Types of scripting languages

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 which distinguish them.

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 (hence its name, Practical Extraction and Reporting Language) it has grown into a full-fledged applications language in its own right.

Job control languages and shells

Main article: Shell script

Another class of scripting languages has grown out of the automation of job control -- 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.

General-purpose dynamic languages

Some languages, such as Perl, have begun as scripting languages but developed into programming languages suitable for broader purposes. Other similar languages -- frequently interpreted, memory-managed, dynamic -- have been described as "scripting languages" for these similarities, even if they are more commonly used for applications programming.

Extension/embeddable languages

A small 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.

JavaScript began as and primarily still is a language for controlling web browsers, however, the standardization of the language as ECMAScript has made it popular as a general purpose embeddable language. Various implementations now exist in products made by Adobe Systems (PDF forms), Macromedia (Actionscript in Flash is a JavaScript work-alike), and others. The Mozilla JavaScript implementations are open source, and are increasingly used by a growing number of applications as their scripting engine.

Uncategorized

See also

External links

zh:脚本 (计算机科学) pl:Skrypt ru:Скрипт es:Lenguaje interpretado fr:Langage de script it:Scripting ja:スクリプト言語 nl:Scripttaal no:Skriptspråk pl:Język skryptowy fi:komentosarjakieli zh:脚本语言

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools