Programming Languages: A Brief Review
Programming Languages: A Brief Review
Programming Languages
A Brief Review
V Rajaraman
Introduction
Assembly Language
if ( a > b ) then
x=y+z;
Procedural p=q+t
else
languages are
x=y–z;
designed using a
p=q*t
set of syntax rules,
endif
which precisely
specify the ‘words’ commands that the statements x = y + z and p = q + t are to
of the language, be executed if ( a > b ) is true. If ( a > b ) is false x = y – z and
and how they may p = q ∗ t are executed.
be combined
legally. iii. Repetition structures which carry out a group of statements
again and again while a condition is true as shown below
while (a > b ) do
x=y–z;
p=q*r
end while
Associated with each high level language is an elaborate compu- Interpreters are
ter program which translates it into the machine language of the easy to write but
computer in which it is to be executed. There are two types of the translated
translators. One of them takes each statement of the high level programs’
language, translates it and immediately executes it. This is execution is slow.
called an interpreter. Interpreters are easy to write but the
translated programs’ execution is slow. The other approach is to
scan the whole program and translate it into an equivalent
machine language program. Such a translator is called a compiler.
A compiler is a complex program but the compiled machine
code takes lesser time to execute compared to an interpreted
program.
Examples
Fortran 95
Algorith- COBOL
mic C
Smalltalk
Procedural Object C ++
Oriented JAVA
Visual Basic
Scripting Perl
Numerical – MATLAB
Programming Problem
Languages Oriented Symbolic – MATHEMATICA
model of the real world problem. One of the earliest OOP JAVA is getting
languages to be developed was Smalltalk. It, however, did not wide acceptance
become popular. Currently an object oriented version of C now as a
known as C++ is the most popular OOP language. programming
language to write
Another development, which has taken place in the last few
applications for a
years, is the internet – an international network of a very large
network of
number of national computer networks. The technology
heterogeneous
developed in creating the internet has been adapted for
computers.
networking computers within an organization. A computer
network within an organization using protocols and providing
services similar to an internet is called an intranet. In both inter
and intranet small application programs (agents or objects to
perform some services – known as applets) may be developed at
any one of the computers connected to the network. One would
like to create a new application by using these applets by either
importing them to one’s own computer or using them via the
network. A language known as JAVA, which is an object
oriented language achieves this. This language achieves machine
independence by defining a JAVA virtual machine for which
the compiler is written. The JAVA code compiled for the virtual
machine is then executed on any machine by an interpreter
which generates machine code from the compiled code. This
technique makes it easy to port JAVA language to any machine Figure 2. Illustrating
quickly (see Figure 2). JAVA is getting wide acceptance now as portability of JAVA.
COMPILER
Machine code
Java Written in a high for JAVA Virtual
Source Program level language Machine (called
(e.g. C) Java Byte Code)
INTERPRETER
The program select reads the given text that is currently on the
display and prints the text on its output; the grep program reads
its input and prints as its output the lines containing the word
‘language’; the wc program counts the number of lines on its
input. Each of these programs select, grep and wc are indepen-
dent programs which could be combined with other programs
also in many ways. Another popular scripting language is Visual
Basic, which is used to develop Graphical User Interfaces (GUI) on
the screen of a Visual Display Unit. It is expected that with
increasing complexity of applications it will be more cost effective
languages.
Most computer languages evolve from the work of a small group and take years to get standardised.
Through an initiative from the United States Department of Defence in early 1970s a standard for a
programming language called Ada was approved in 1983 before a working compiler was written. Ada
was designed based on world wide competition, where a French entry by Jean Ichbiah won in 1979.
Initially the language was named DOD-1 but the name was changed later to Ada in honour of Lady Ada
Augusta Lovelace who is reputed to have programmed an early mechanical computer designed by Charles
Babbage in UK in the 1850s. Ada is a large complex language, which includes the concept of tasks,
concurrent execution, real-time execution of tasks, exception handling and abstract data types. Due to
its complexity, compilers did not appear till 1987 in spite of support and funding by US Department of
Defence. It was revised in 1995 to include better object orientation and better tasking models for
processes. It is, however, more or less dead today probably due to its complexity and strong competition
from C and later C++ and Java.
A language does not seem to survive even if it is very good and has strong Government support. Complex
interplay of vendor support, committed user groups, corpus of existing application programs, ease of
learning and use, good compilers giving efficient object code and popular hype seem to prop up some
languages at the expense of others. Except for perennials such as FORTRAN and COBOL most other
languages have a life of less than a decade. Even in these cases only their names have survived! The
modern versions of FORTRAN and COBOL are quite different from the versions of the 60s.
Conclusions