Sunday, February 22, 2009

Scripting Language versu system programming languages

The content posted here are the main points copied from http://home.pacbell.net/ouster/scripting.html

1. Introduction

Scripting languages and system programming languages are complementary, and most major computing platforms since the 1960's have provided both kinds of languages. The languages are typically used together in component frameworks, where components are created with system programming languages and glued together with scripting languages. However, several recent trends, such as faster machines, better scripting languages, the increasing importance of graphical user interfaces and component architectures, and the growth of the Internet, have greatly increased the applicability of scripting languages. These trends will continue over the next decade, with more and more new applications written entirely in scripting languages and system programming languages used primarily for creating components.


2. System Programming Languages

These are higher level and strongly typed compared to the assembly languages.

Higher level: Details such as register allocation, memory allocation, procedure calling sequences, passing on the parameters to the procedures are hiden from the code point of view.


Strongly Typed: From Computer point of view each location is typeless. Means we can store anything and interpret as whatever we want. But to bring stability and decrease the complexity of systems we develop languages become typed. This means a memory location might be thought to contain only integers or strings based on the type associated in the program.

And these languages are compiled before they can be run. This means they become machine depended instructions before they get executed with some exceptions.


3. Scripting Languages

Scripting languages assume that there already exists a collection of useful components written in other languages. Scripting languages aren't intended for writing applications from scratch; they are intended primarily for plugging together components.

In order to simplify the task of connecting components, scripting languages tend to be typeless: all things look and behave the same so that they are interchangeable. A typeless language makes it much easier to hook together components. There are no a priori restrictions on how things can be used, and all components and values are represented in a uniform fashion. Thus any component or value can be used in any situation; components designed for one purpose can be used for totally different purposes never foreseen by the designer.

Another key difference between scripting languages and system programming languages is that scripting languages are usually interpreted whereas system programming languages are usually compiled. Interpreted languages provide rapid turnaround during development by eliminating compile times. Interpreters also make applications more flexible by allowing users to program the applications at run-time.

4. Different tools for different tasks

In deciding whether to use a scripting language or a system programming language for a particular task, consider the following questions:

  • Is the application's main task to connect together pre-existing components?
  • Will the application manipulate a variety of different kinds of things?
  • Does the application include a graphical user interface?
  • Does the application do a lot of string manipulation?
  • Will the application's functions evolve rapidly over time?
  • Does the application need to be extensible?
"Yes" answers to these questions suggest that a scripting language will work well for the application. On the other hand, "yes" answers to the following questions suggest that an application is better suited to a system programming language:

  • Does the application implement complex algorithms or data structures?
  • Does the application manipulate large datasets (e.g. all the pixels in an image) so that execution speed is critical?
  • Are the application's functions well-defined and changing slowly?
Take a look @  http://home.pacbell.net/ouster/scripting.html for elaborate explaination.