Programing Languages

The following is a list of the early programming languages

 

ALGOL 60

It was developed by an international committee of academics as as ALGOrithmic Language. It was the first widely used teaching language and led to ALGOLW, ALGOL 68 and PS ALGOL. It is no longer used, but its influences can be felt in many contemporary languages including Pascal and C.

Below is an example program. You may note that is bears some similarity to C, particularly the "\n" command for an end of line.

'Begin'
        'Comment'
                Input and output are not in the RRA60 included.
                so this example is still an example.

                Four numbers are requested. 
        ;


        'Real' x, y;
        'Integer' i, j;


        outstring (1, "Give me two real numbers:\n");
        inreal (0, x);
        inreal (0, y);
        outstring (1, "Got: ");
        outreal (1, x); 
        outstring (1, " and ");
        outreal (1, y); 
        outstring (1, ".\n");

        outstring (1, "Give me two integer numbers:\n");
        inreal (0, i);
        inreal (0, j);
        outstring (1, "Got: ");
        outinteger (1, i);      
        outstring (1, " and ");
        outinteger (1, j);      
        outstring (1, ".\n");

        outstring (1, "done.\n")
'End'
[11]

A list of webpages about ALGOL can be found at the DMOZ website.


FORTRAN

The FORmula TRANslation language is widely used today in the engineering field.

Work on FORTRAN began in 1954. In 1957 an IBM research team headed by John Backus delivered the first FORTRAN compiler for the IBM 704 computer. This compiler was a vehicle for expressing scientific and mathematical computations for researchers who wanted to conduct research using a programming language similar to mathematical formulas, rather than using cumbersome machine-language expressions.

FORTRAN uses "call by value" when passing parameters to subroutines. This means that changes to the values in the subroutine do not affect the values in the main program.

PROCEDURE SWAP(X,Y:INTEGER)

VAR T:INTEGER
BEGIN

	T:=X;

	X:=Y;

	Y:=T;

END
VAR A,B:INTEGER;

...

A:=1;

B:=2;

SWAP(A,B);
WRITELN(A,B);

 

This would give "1 2" as an output. The reason is that the values are swapped in X and Y, but are not passed back to the main program and are destroyed when the subroutine SWAP terminates.

By the way, the reason that the program in in capital letters is that when FORTRAN was developed, computer keyboards were all upper case.


Below is an example program to find the area of a triangle, but demonstrates freeform input, user-defined types and declaration of intent for function arguments.

 

PROGRAM Triangle_Area
IMPLICIT NONE 


TYPE triangle 
	REAL :: a, b, c
END TYPE triangle
TYPE(triangle) :: t
PRINT*, 'Welcome, please enter the&
	& lengths of the 3 sides.'
READ*, t%a, t%b, t%c
PRINT*,'Triangle''s area: ',Area(t) 
CONTAINS
FUNCTION Area(tri)
IMPLICIT NONE 
REAL :: Area ! function type
TYPE(triangle), INTENT( IN ) :: tri
REAL :: theta, height
theta = ACOS( (tri%a**2 + tri%b**2 - tri%c**2) / (2.0*tri%a*tri%b) )
height = tri%a*SIN(theta); Area = 0.5*tri%b*height
END FUNCTION Area
END PROGRAM Triangle_Area

[12]

For more information on FORTRAN, visit the Controversy, compromise, modernization: From FORTRAN to Fortran 90 website.


COBOL

COBOL is an acronym that stands for "Common Business-Oriented Language." The COBOL language has been in widespread use in computer applications (business and otherwise) since the early 1960s. It is a high-level language with English-like syntax. COBOL has been embraced by every sector of business and government for its readability, maintainability, and portability. It has continuously evolved to take advantage of advances in computer technologies.

Unlike any other contemporary programming languages, COBOL was designed for use in the business world and is the language of choice of serious business applications developers worldwide. Today, COBOL is the solution for the enterprise.

There is a common misconception about COBOL. The U.S. Department of Defense is often given credit for sponsoring COBOL as a way to standardize computing within the military. Although this is not strictly true, the Pentagon did quickly see the benefits of the effort and contributed heavily once invited.

Although the initial requirement for COBOL stated that the standard had to be good enough to last a couple of years, COBOL remains the most popular language on mainframes, and its use is growing on other platforms as well. One reason COBOL became so popular is that the US DoD backed COBOL strongly to avoid contending with multiple languages. Their involvement allowed them to insist that COBOL include the most useful elements for business data processing. A second reason for COBOL’s popularity is that it was designed to give identical results on any computer it ran on. This feature, validated through government acceptance testing, gave corporations and governments the confidence to invest heavily in COBOL. [13]

See the Introducing COBOL website for more information.


LISP

For more information on Lisp, please visit the An Introduction and Tutorial for Common Lisp website.

The following text is taken from A Brief History of Lisp paper from the website listed above. For information about Lisp constructs, look to the Lisp Basics paper.

Lisp is a family of langauges with a long history. Early ideas in Lisp were developed by John McCarthy during the 1956 Dartmouth Summer Research Project on Artificial Intelligence. McCarthy's motivationwas to develop an algebraic list processing language for artificial intelligence work. Early dialects of Lisp were written on the IBM 704 and the IBM 7090, the Digital Equipment Corporation (DEC) PDP-1, the DEC PDP-6 and the PDP-10 The primary dialect between 1960 and 1965 was Lisp 1.5. By the early 1970s there were two predominant dialects, MacLisp and Interlisp.

MacLisp improved on the Lisp 1.5 notion of special variables and error handling. MacLisp also introduced the concept of functions that could take a variable number of arguements, macros, arrays, non-local dynamic exits, fast arithmetic, the first good Lsip compiler and an emphasis on the execution speed.

Interlisp introduced many ideas into Lisp programming environments and methodology. One of the Interlisp ideas that influenced Common Lisp (the main modern dialect) was an iteration implemented by Warren Teitelman that inspired the _loop_ macro used on both the Lisp Machines and in MacLisp, and now in Common Lisp. [14]


BCPL

BCPL was developed as a tapeless systems programming language, by Martin Richards. BCPL basic data type was the machine word, and it made heavy use of pointers and address arithmetic.

It makes a distinction between IF...THEN...ELSE and IF...THEN, using different commands for each. TEST <condition> THEN <statement1> ELSE <statement2> and IF <condition> THEN <statement>, respectively.


PL/1

PL/1 stands for Programming Language 1. It was developed by IBM as an attempt to regain control of the market. To quote Greg Michaelson,

"It just shows IBM's arrogance that they'd invent a language and call it programming language one." [15]

 

PL/I defines its data types very precisely without regard for any hardware. For example, an "integer" is defined as having a mode of REAL or COMPLEX, base of BINARY or DECIMAL, along with the precision that you require.

Therefore, FIXED BINARY(12) declares a binary integer of 12 data bits, whereas FIXED DECIMAL(3) declares a decimal integer of 3 decimal digits. You get precisely what you ask for. The implements deliver even if the machine has no support for such data type or precision.

IBM still sell PL/1 and it is found in many legacy systems.

Examples of PL/1 can be found at the PL/1 website Examples given are for a shell sort and a linked list.


B

B was a programming language based on BCPL. It was, in many ways a cut down version that was simpler to use.


C

The C language is a general-purpose programming language that was originally designed by Dennis Ritchie of Bell Laboratories and implemented there on a PDP-11 in 1972. It was first used as the systems language for the UNIX operating system. The developer of UNIX, Ken Thompson, had been using both assembler and a language named B to produce initial versions of UNIX in 1970. The invention of C came about to overcome the limitations of B. C evolved from B and BCPL and incorporated typing.


C++

To a large extent, C++ is a superset of C, and carefully written C will compile as C++. There are a few major differences though, notably that all functions must be declared before they are used, rather than defaulting to type int.


The program below implements a simple stack using a function call.

class Stack {
       public:
         void Push(int value); // Push an integer, checking for overflow.
         int top;          // Index of the top of the stack.
         int stack[10];    // The elements of the stack.
     };

     void
     Stack::Push(int value) {
         ASSERT(top < 10);           // stack should never overflow
         stack[top++] = value;
     }

C did not have this idea of Class. The nearest it had was Struct, where all variables are public. Class allows private and protected variables. This forces the programmer to write code using only functions available to alter data. One of the most tempting ways to write code is to alter data directly. This often leads to errors that are hard to track down.

C++ allows better written code to be produces. It is an OOL or Object Orientated Language. The principle behind this is that programs solve problems in the real world. The real world is split up into objects, such as building block, and robot arm. If the arm's position is known, and the position and size of the block are known, it is relatively simple to make the arm pick up the block.


JAVA

Java is an object-oriented programming language (OOPL). It was developed by Sun Microsystems and introduced in 1995. Java was invented by Canadian James Gosling.

Java's main claim to fame is it's portability, which allows the same Java program to run on any platform without having to be rewritten or recompiled. Java programs are able to run on PC's, Mac's, mainframes and even in consumer product's, such as VCR's, security systems, and telephones.

Java's portability is achieved in the way that it is compiled and run. Java source code is first compiled into something called bytecode. This bytecode is not the executable machine language that you get when compiling source from other languages such as C. Instead, it contains instructions to the Java Virtual Machine (JVM) that is resident on the platform that the program will be running on. The virtual machine acts as an interface between the bytecode and the processor on that platform. It interprets the bytecode one instruction at a time and translates it into native machine code. The processor then carries out the specified operation. Any platform which has a virtual machine will run any Java program, using it's own instruction set. Most of the major operating systems, such as Windows, UNIX and Mac have their own virtual machine, as well as the major web browsers, such as Internet Explorer and Netscape Navigator.

Because Java is interpreted, it does not run as fast as some other languages. However, Just In Time (JIT) compilers are coming out that take the bytecode, and compile it into native code on the fly, making Java run faster.

Two types of Java programs can be written; applications and applets. Applications are standalone programs that do not require a browser to execute. Applets are Java programs which are embedded in HTML documents and are run by web browsers. When you download a page which contains an applet, you are actually downloading the bytecode for that applet. The bytecode is interpreted by your browser and run on your computer. Java can be used to create dynamic and interactive web pages. [16]

See the A Beginners Guide To Java website for more information.

The idea of a virtual machine is not new. when MS-DOS and CP/M were battling it out for the IBM PC, there was an alternative called

"p-System " which was an operating system that achieved portability by creating a pseudomachine inside the computer. The problem with it was that although it was safe, it was very slow.

This is the same problem plaguing those in the development of the Java virtual machine as an operating system. It would be too slow for most users' needs.

 

 

 

 

 


 


BASIC

BASIC (standing for Beginner's All Purpose Symbolic Instruction Code) is a system developed at Dartmouth College in 1964 under the directory of J. Kemeny and T. Kurtz.

It was implemented for the G.E.225.

It was meant to be a very simple language to learn and also one that would be easy to translate. Furthermore, the designers wished it to be a stepping-stone for students to learn on of the more powerful languages such as FORTRAN or ALGOL.