You are on page 1of 12

Introduction to

Integrative
Programming and
Technologies
SCRIPTING (SCRIPT LANGUAGE)
Scripting

John Ousterhout’s dichotomy: high-level programming languages tend


to fall into – scripting languages vs. system programming languages //
programming in the small vs programming in the large.

Application Languages Scripting Languages


- Typed statically - Typed dynamically
- Support creating complex data - Little or no provision for complex
structures data structures
- Compiled into machine code - interpreted
Stand-alone – operate largely
independently of other programs
Scripting

 Scripting – coding for a special runtime environment to automate


the execution of tasks; scripts are often interpreted rather than
compiled.

Runtime environments (host program) could refer to: software


applications, webpages within the browser, shell operating systems.
Embedded systems, games
Scripting

 Scripting Languages can loosely refer to dynamic high-level general


purpose interpreted languages (e.g., Perl, Python, Powershell, Tcl)
 The term “Script” commonly refers to small programs (up to few
thousand lines of code) in such dynamic high-level general purpose
interpreted languages
- Some of these languages were developed for use within a
particular environment but have evolved into portable domain-
specific or general-purpose languages.
- Some general purpose languages have dialects that are used
for scripting.
Scripting

 The spectrum for scripting languages is broad

Scripting Languages

Domain-specific
General purpose
language
language
Scripting Languages more examples

 Bash – for unix operating systems (Unix Shell)


 ECMAScript and Javascript – primarily a scripting language for web
browsers but also considered general-purpose
 Visual Basic for Applications (a dialect of Visual Basic) – for MS
Office applications
 Emacs Lisp - a dialect of Lisp for Emacs editor
 Lua – an extension language
 Python – a general-purpose language commonly used as extension
language
 Game systems: e.g., Linden Scripting Language and Trainz are
scripting extensions
Scripting Languages

 Intended to be learned quickly and written as short source code


files
 Simple syntax and semantics – hence called “script”
 Executed from start to finish, no explicit entry point
 Interpreted rather than compiled – although host environments are
usually compiled
 Scripting languages use high-level abstraction – spares users the
coding details of internal variables, data storage, and memory
management
 Scripts can be created or modified by users/developers
History of Scripting

 Used in early mainframe computers (1950s), e.g., JCL (Job Control


Language) that were used to control batch processing of IBM
mainframes
 Interactive shells came in the 1960s with the first time-sharing
systems, they used shell scripts to control the execution of a program
within another program (i.e., the OS Shell)
 Then came the general-purpose scripting languages such as Tcl
and Lua
 Later, software that incorporate scripting languages, e.g., modern
web browsers provide a language for writing extensions and
controlling the browser like Javascript and XUL
Types of Scripting Languages

 Shell Languages/Job control languages


 a large number of scripting languages originated job control
automation
 Start and control the behaviour of system programs
 Editor/ Text processing languages
 A number of text editors support either built-in macros (built into the
editor) or external macro implementation, or both built-in and external
 Glue languages
 Scripts that are used to connect software components
 Adapt different components of code that would otherwise be
incompatible
Types of Scripting language

 GUI scripting languages


 Interact with GUI components like human user would
 Used to automate user actions
 Application-specific scripting languages
 A domain-specific scripting language specialized for a single
application
 Extension/Embeddable languages
 Instead of an application-specific script, there are general-purposes
scripting languages embeddable application programs
 Example: Javascript began and still a scripting language inside Web
browsers but its stardardization ECMAScript made it a general-purpose
embeddable language
Examples of scripting languages
(listed in Wikipedia)
- AppleScript - JCL
- ColdFusion - CoffeeScript
- DCL - Julia
- Embeddable Common Lisp - JScript and JavaScript
- Ecl - Lua
- EarLang - m4
- EXEC - Modern Pascal
- EXEC2 - Perl (5 and 6)
Examples of scripting languages
(listed in Wikipedia)
- PHP - Scheme
- PowerShell - Tcl
- Pure - Unix Shell Scripts (Ksh, csh, bash, sh and others
- Python - Rebol
- VBScript - Red
- Work Flow Language - Rexx
- XSLT - Ruby

You might also like