Script languages (also script languages ) are programming languages that are executed via an interpreter . Sometimes they do without language elements, the benefits of which only come into play when dealing with more complex tasks. In script languages, for example, the mandatory declaration of variables is usually dispensed with - this is advantageous for the rapid creation of small programs (see also prototyping ), but disadvantageous for large programs , for example because of the lack of checking for typing errors in variable names.
Programs that are written in scripting languages, even to scripts or scripts called while in the operating environment of Microsoft usually the term macro is used. Scripts are delivered almost exclusively in the form of source text files in order to enable easy editing and adaptation of the program.
Frequently present characteristics are:
- implicitly declared variables (this also includes dynamic function names),
- dynamic typing ,
- automatic memory management , especially automatic memory cleaning ,
- dynamic class membership or prototype-based inheritance ,
- immediate execution by interpreting the source text without a separate translation phase.
With some scripting languages, the program code (as well as other data) can be manipulated by the program itself; that makes those languages particularly flexible.
The areas of application and properties of conventional programming languages and script languages now overlap strongly (see the section on delimitation ), which is why a strict separation between conventional programming languages and script languages is rarely possible.
From an architectural point of view, scripting languages are often used to connect or call up existing components in an application program . The components themselves are developed in a more complex programming language. An example of this is a shell script that calls external programs. These programs are generally developed in different programming languages. Another example is the BPEL language , which is used to describe web services that can be developed in various programming languages.
Script languages were initially only used for smaller automations, but today they are also used in areas that were previously reserved for the classic programming languages. Improvements in the interpreters have reduced the speed difference compared to static languages; Together with the advancement of computing power, this often results in an acceptable execution speed that could previously only be achieved with compiled programs. In addition, variables can optionally be declared in some of the independent programming languages for better error checking. With modern script languages, some applications, for example for the evaluation of data, can therefore be implemented completely without external programs.
Command line interpreter
Some script languages are derived from the command line interpreters of the operating systems. The interpreters are primarily for interactive use; H. designed for entering commands. The input language is expanded to include variables, arithmetic expressions, control structures ( if , while ) and others, thus enabling the automation of tasks (e.g. during unattended installation ) by writing "small programs" in files. These files can then be executed by the interpreter. The files are called under the operating system Unix shell scripts (executed by one of Unix shells sh , csh ...) or under DOS and Windows also batch scripts (executed by COMMAND.COM and cmd.exe ).
Command line interpreters are to be distinguished from interactive languages (such as Lisp , Python , Tcl or Perl in the debugger ), which can execute interactive program sections for testing and debugging, but are not so closely integrated in the operating system.
- Bourne Shell ( sh ) - Unix Bourne Shell (the classic Unix shell)
- bash - GNU replacement and extension of the sh shell
- Kornshell ( ksh ) - further development of the classic sh shell
- C-Shell ( csh ) - BSD Shell (Unix versions from Berkeley)
- cmd.exe - Windows command interpreter from Windows NT
- Windows PowerShell - command interpreter for Microsoft Windows
- TACL - command interpreter for tandem systems
- Digital Command Language ( DCL for short ) - command language for VMS platforms
Scripting languages available as a library
- GNU Guile - GNU Extension Language
- Lua scripting language to embed in programs, often in - computer games to find
- AngelScript - scripting language to embed in programs, often in computer games to find
- S-Lang - platform-independent scripting language for integration into programs
- Sleep - In Java written scripting language to embed in Java programs
- Squirrel - Lua-inspired scripting language with C -like syntax
- Tcl - Tool Command Language by J. Ousterhout
- VBScript and JScript - standard scripting languages in newer versions of Windows
- Windows PowerShell - Microsoft's scripting language for integration in .NET programs
Script languages of various programs
Script languages can also be used in application programs to automate tasks or expand the capabilities of the program. Some of the functionality of the program itself is also implemented in this script language. In this way, users can quickly expand the functionality of such a program with new functions or modify existing ones without rewriting the program themselves. These extensions can themselves be so extensive that the program performs completely new tasks that - from the user's point of view - have nothing in common with the previous program. So the text editor Emacs also became an e-mail program (Wanderlust) or a web browser (Emacs-W3).
In contrast to plug-ins , scripts or macros are much more flexible and are mainly used for small automation.
- AppleScript - the scripting language of macOS and Mac OS Classic
- AutoHotkey - a scripting language for Windows and Windows programs, compilable
- AutoIt - an alternative to the Windows Script Host
- Emacs Lisp - the scripting language of the Emacs editor
- LPC - C like language for MUDs
- Python - various, mainly open source , programs (e.g. LibreOffice , Blender and GIMP ) can be scripted with it
- OpenOffice Basic - Basic macro language contained in OpenOffice, similar to VBA in MS Office
- QuakeC - the scripting language of the Quake computer game
- REXX - used as a macro language in particular under OS / 2 (e.g. in the "Extended Editor" EPM).
- Tcl - macro language used in the AOLserver
- UnrealScript - the Unreal Engine's scripting language
- Vim scripting language
- VBA (Visual Basic for Applications) - scripting language for Microsoft products; is also compilable
- VBScript and JScript - standard scripting languages in newer versions of Windows
Script languages on the WWW
For the WWW , scripting languages are often used on the servers to create dynamic pages or entire web applications . This happens, for example, with wikis , forums , guest books and online businesses .
- Perl - first scripting language that was widely used in web servers
- PHP - the most common scripting language on web servers; was designed directly for this task
- Python - can be connected to a web server or used with a stand-alone web server
- Ruby - is executed either via CGI or with mod_ruby, increasingly also using Ruby on Rails
- VBScript in ASP
Independent scripting languages
Script languages can also be executed by other programs separately from their interpreter. Some of these are designed for special tasks, others are general-purpose languages. These languages have the concepts such as namespaces and encapsulation necessary for extensive program projects and are therefore not infrequently used for larger applications .
Examples: specialized languages
- awk - word processor (list generator) under Unix
- GLE - Graphics Layout Engine, script language for creating graphics and diagrams
Examples: general languages
- Perl - programming language with advanced word processor capabilities
- PHP - originally designed for web application development
- Python - partially object-oriented programming language
- REBOL - programming language by Carl Sassenrath
- REXX - scripting language from IBM
- Ruby - object-oriented programming language
- Tcl - universal scripting language with advanced word processor capabilities and graphic toolkit Tk
Comparison of different scripting languages
Comparison of syntactic possibilities in script languages
|language||Annotations||Anonymous function||Pattern matching||Named parameters||Optional parameters||Currying||Varargs|
- Overview of Scripting Languages (SAP Help Portal)
- Difference Between Programming, Scripting, and Markup Languages