Scripting Languages

Programming computers has evolved much over time. Before electronic computers were around, Charles Babbage created a mechanical computers and programs for it. Since then, the computer program has evolved rapidly.

It all started with the breadboard. This was not software programming, but hardware programming, where wires were physically connected on a circuit board to create functionality. This was the genesis of the CPU (Central Processing Unit). Modern CPU’s are chips designed to perform specific functions that were originally programmed, like addition. The early programmers built simple machines using this complex method. Modern computer system build on so much that has been built beforehand.

While many people today would not consider the CPU as a program, I would point out that a computer does not know how to add numbers, and addition is a program encoded in circuitry to perform this task. The person creating the circuits for this was instructing the computer, and therefore programming.

First Generation Languages

Once CPU’s were created with a generic instruction set, the programs were built as raw data to the CPU’s which contain instructions to process. This machine-reabable language is ususally called object code from higher level languages. This was the mode of programmiing before human-readabl3 languages were created.

The format of the data varies my CPU processor, but typically involves a byte of data indicating the operation to perform, and up to several more bytes for addressing parameters. This can be tedious mapping memory without a higher-level language to help you.

Second Generation Languages

Once the computer had its 1GL running, people created Assembly tools which translated mnenomic instuction and data spaces into this raw “object code” for the CPU to execute.

However, programming in Assembly is time consuming and error-prone. For many computers with limited memory models, this was the only way to squeeze the most out of the existing hardware.

Third Generation Languages

Then the High Level Language was created. This allowed programmers to work with structured programming concepts and the language compilers translated the code into the object code that the processors could read.

There have been a great many of these languages, encompassing statement languages (life FORTRAN or COBOL), block-structured lanuages (like Pascal or C), Object-Oriented Lanuages (like Smalltalk), and scripting languages (like Shell scripting, Perl, Python, Ruby) that fit into each of those categories.

Languages can produce either object code (FORTRAN, C) or an intermediate code that runs in an interpreter (Java, Lisp). An interpreter is a program that acts like its own CPU, taking byte-code from an intermediary compile and executing it in its own environemnt. These have become popular lately with Java and C#/.NET platforms. Because these programming languages do not target specific CPU’s, they are “hardware agnostic” and can run on interpreters available for different CPU/operating-systems.

Fourth and Fifth Generation Languages

Fourth Generation Programming Lanuages are specialized for a particular task or environment (SQL, Visual Basic).

Fifth Generation Languages are designed to solve problems instead of running algorithms. This is especially popular in the Articifical Intelligence field (Prolog).

Language Types

BASIC

Structured

List

Object Oriented

Scripting Languages

Scripting Languages evolved from basic needs to automate and glue applications together. They did not start as full-featured languages, but nowdays are rivaling and surpassing those features found in other languages. There is something unique about the class of scripting languages that allow for fast development and modern features.

As these lanuaages added more libraries and expressive syntax, they moved away from being simple “scripting languages” and become traditional 3GL programming languages.

The Earliest Scripting was Job Control Language (JCL) used by computers running job with decks of punch cards. These was needed to seperate the programs, data, and file information and conditionally run successive programs based on result codes from executing a program. Needless to say, this was a simple but important process, and has evolved some. It is still in use in the Mainframe world where the card-deck paradigm is still used, even though cards are no longer around.

On Unix-based computers, JCL was replaced with Shell Scripts. It was build to glue programs together, but allowed for more flexibility and structure. Variables, Conditional Blocks, Loops and Routines were available. These scripting languages were built into the command shells (Command Line Interfaces or CLI). On Unix, this these are Sh (shell), bash, c-shell, etc. On PC DOS systems, these were known as “Batch files” (remember autoexec.bat?).

When needs for more complex scripting arose, the modern scripting languages were born.

REXX (Restructured EXtended eXecutor) was born in IBM in the early 1980’s as a powerful scripting language. If offered a clean syntax, powerful constructs, and a great library fo process strings. It is still around and has been modified for Objects, Visual Programming, and Network applications. Since the original implementation was on Mainframes, and later ported to OS/2, it was never considered more than a scripting language until later.

Perl (Pathetic Eclectic Report Lister) was created to build ac-hoc reports and used a powerful, built-in Regular Expression processor to match and operate on strings. Over time, this evolved to become one of the most powerful languages to use for string processing (step aside SNOBOL!). It is currently and version 5 with version 6 on the drawing board, and a powerful library of useful code to leverage, and is perhaps the most popular Scripting Lanuage these days.

The TCL scripting language is known for its simplicity. It is usually married with the TK graphic interface toolbox. I need to spend more time with this language to see how it fits into the landscape of scripting languages

Python took away the ills of Perl, namedly a complex syntax and built a more modern, object-oriented language. By removing all of what was superfluous, it created a clean, minimal structure that still allowed for expressive coding. Its followers have also bestowed a complete library of features for everyday programming.

Ruby is the lastest, language and has a strong following and a unique design. Its roots are strongly entrenched in Perl, yet it has cleaned up the confusing syntax. It is also a strong Object-Oriented Language, and applies the latest paradigns for advanced programming. Its use of anonymous blocks associated with a function (method) call is brillant and allows development of generic code as well as removing the need for the coding of looping structures when implemented as an iterator. It has a good object model and really everything is an object and have methods to help you. The syntax is more familiar to Perl users, and the full Regular Expression engine is built-in to the syntax (and are implemented as objects).

 
programming/sl.txt · Last modified: 2005/08/21 22:05