manpagez: man pages & more
info guile-tut
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1 What are scripting and extension languages

A scripting language is a programming language which serves as glue between other system programs. In the UNIX world, the traditional scripting language is the Bourne shell, which allows many UNIX commands to be executed in sequence, or in a pipeline. Traditional UNIX commands are cleverly written to work well when put together in a script.

Other examples of UNIX scripting languages are AWK, Perl, Scsh (the Scheme Shell: a Scheme interpreter enhanced to do good scripting), Python, Tcl, Java …

UNIX programmers noticed, more than 25 years ago, that scripting languages can do serious work, so the Bourne shell was written to have variables, operators and control structures, just like a full-featured programming language.

What scripting languages have, that traditional programming languages do not, is the ability to easily run an external program (or a pipeline of external programs) and use the returned values and output from that program in useful ways.

An extension language is a programming language interpreter offered by an application program, so that users can write macros or even full-fledged programs to extend the original application. Extension languages have a C interface (it is usually C, but it could be any other compiled language), and can be given access to the C data structures. Likewise, there are C routines to access the extension language data structures.

Extension languages abound in the software world, even though the name extension language is seldom used. Examples are:

One lesson we can learn from looking at classical large software applications is that "writers of large programs" always end up throwing in some kind of parser for configuration or scripting.

Of the examples listed above, Emacs Lisp, Tcl, Libscheme and Guile have an important property: they are not added as an afterthought for a specific application. They are general-purpose languages which a user can learn (even in college courses) and then use to customize the application program.

This is a recent and (in my opinion) very exciting direction in large-program software engineering: program designers can link in the Guile or Tcl library from the very beginning, and tell their users "You want to customize this program? Just use Scheme (or Tcl, or whatever language), which you already know!"


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.