A History of Programming Languages
A History of Programming Languages
Languages
A History of Programming
Languages
What is a Programming Language?
begin
integer p, q;
y := 0; i := 1; k := 1;
for p:=1 step 1 until n do
for q:=1 step 1 until m do
if abs(a[p, q]) > y then
begin y := abs(a[p, q]);
i := p; k := q
end
end Absmax
COBOL
• Commercial data processing was one of the
earliest commercial applications of computers.
• The U.S. Defense Dept. sponsored the effort to
develop COBOL (Common Business-Oriented
Language), which was standardized in 1960,
revised in 1961 & 1962, re-standarized in 1968,
1974, and 1984.
• As of 2000, more lines of source code have been
written in COBOL than any other programming
language.
Influence of COBOL
IDENTIFICATION DIVISION.
PROGRAM-ID. PRG4.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 G1.
02 ROLLNO PIC 9(3).
02 FILLER PIC X.
02 STUNAME PIC A(8).
02 FILLER PIC X.
02 MARK1 PIC 9(3).
02 FILLER PIC X.
02 MARK2 PIC 9(3).
02 FILLER PIC X.
02 MARK3 PIC 9(3).
PROCEDURE DIVISION.
ACCEPT G1.
DISPLAY G1
STOP RUN.
LISP
(A (B C) D (E(F G)))
APL
• APL (A Programming Language) was
designed by Ken Iverson to handle
scientific computations, especially those
involves vectors and matrices.
• It has a large set of operators and requires a
special character set and is extremely
difficult to read.
APL Keyboard Layout
Sample APL Program
(~R∊R∘.×R)/R←1↓⍳R
Executed from right to left, this means:
•ιR creates a vector containing integers from 1 to R
– (if R = 6 at the beginning of the program, ιR is 1 2 3 4 5 6)
•Drop first element of this vector (↓ function), i.e. 1. So 1↓ιR
is 2 3 4 5 6
•Set R to the new vector (←, assignment primitive), i.e. 2 3 4
56
The 1960s – An Explosion of
Programming Languages
• The 1960s saw the development of
hundreds of programming languages, many
of them special-purpose languages (for
tasks such as graphics and report
generation)
• Other efforts went into developing a
“universal programming language” that
would be suitable for all programming
tasks.
PL/I
• IBM developed NPL for its 360 computers
(renaming MPPL and later PL/I).
• PL/I used an ALGOL-style syntax and
combined featured of both FORTRAN and
COBOL.
• PL/I was a complex language that saw some
commercial success and its subset PL/C saw
some success as a teaching language in the
1970s.
A Program in PL/I
MAINFACT:PROC OPTIONS(MAIN) REORDER;
FACT:PROC(NUM) RETURNS(FIXED BIN(15,0));
DCL FCT FIXED BIN(15,0) INIT(1);
DCL NUM FIXED BIN(15,0);
DO WHILE(NUM>0);
FCT=FCT*NUM;
NUM=NUM-1;
END;
RETURN (FCT);
END FACT;
FACT1:PROC(NUM1) RECURSIVE;
DCL NUM1 FIXED BIN(15,0);
IF NUM1 <=1 THEN
RETURN(1);
ELSE
RETURN(NUM1*FACT1(NUM1-1));
END FACT1;
1-58
Python
• An OO interpreted scripting language
• Type checked but dynamically typed
• Used for CGI programming and form
processing
• Dynamically typed, but type checked
• Supports lists, tuples, and hashes
Ruby
• Designed in Japan by Yukihiro Matsumoto (a.k.a,
“Matz”)
• Began as a replacement for Perl and Python
• A pure object-oriented scripting language
- All data are objects
• Most operators are implemented as methods,
which can be redefined by user code
• Purely interpreted
Lua
• An OO interpreted scripting language
• Type checked but dynamically typed
• Used for CGI programming and form processing
• Dynamically typed, but type checked
• Supports lists, tuples, and hashes, all with its
single data structure, the table
• Easily extendable
The Flagship .NET Language:
C#
• Part of the .NET development platform
(2000)
• Based on C++ , Java, and Delphi
• Includes pointers, delegates, properties,
enumeration types, a limited kind of
dynamic typing, and anonymous types
• Is evolving rapidly
Markup/Programming Hybrid
Languages
• These include
– XSLT (eXtensible Stylesheet Language
Transformation)
– JSP (Java Servlet Pages)
XSLT
• eXtensible Markup Language (XML): a
metamarkup language
• eXtensible Stylesheet Language
Transformation (XSTL) transforms XML
documents for display
• Programming constructs (e.g., looping)
JSP
• Java Server Pages: a collection of
technologies to support dynamic Web
documents
• JSTL, a JSP library, includes programming
constructs in the form of HTML elements
The Future