|
Softpanorama |
May the source be with you, but remember the KISS principle ;-)
Softpanorama Search
|
Prev | Up | Contents | Down | Next
The first and the most question that we need to answer is "What is scripting?" If I were to give a concise answer, it would be the following: Scripting is the use of a special language to automate common system or program operations. So scripting is a programming language but slightly different then a typical compiled programming languages like C or Pascal or even interpreted languages with strict typing like Java. They are more high level and belong to a class of languages that are called very high level languages.
Scripting has two slightly distinct faces:
System integration (shell) area (OS macrolanguage), the application area well represented and well served by Unix shells and Windows scripting host.
Application automation area. Here scripting languages serve as application macrolanguage. Visual Basic for Applications is probably the most prominent example here, although JavaScript, REXX and TCL also should be mentioned.
Modern scripting languages have become powerful enough to be considered
combine those two functions under a single umbrella. As system integration
language they go far beyond Unix shell and are closer to full-fledged programming
languages. As for macro language the successes are more modest and
one of the few successful applications with scripting support is Microsoft
Office. But in both roles the essential function is the same to serve as
a glue for existing tools and components.
Shell scripts are a very good example of the initial stage of scripting
languages development. The shell is the Unix program that you use when you
are on a command line -- it takes your commands as input, and executes them
for you. Almost every shell includes some ability to use a special language
in it to automate things it does. The term "shell script" is a generic term
for a script written in any shell's built-in language. While Unix
shell are powerful scripting languages in their own right, as the task becomes
more complex a more modern scripting language like Perl is more appropriate.
C compilers usually convert programs into machine language -- that means that executable is platform dependent. Perl does not produce any executable, but is closer to compiler model that one may think -- if you run a Perl program in interpreter, it's first compiled into bytecode, which is then converted (as the program runs) into machine instructions. So like Java, Perl does have an intermediate representation, but unlike Java you cannot get it separately.
It's somewhere in between traditional shells that does not have any intermediate format and Java that has well defined platform independent intermediate format (Java machine), There is a separate utility called the Perl Compiler, but reliability can be problem and actually one cannot get much speed improvement for such a complex language -- most features are functions calls anyway.
Prev | Up | Contents | Down | Next
Copyright © 1996-2009 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Site uses AdSense so you need to be aware of Google privacy policy. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
Disclaimer:
Last modified: September 05, 2009