History of Computer
Languages
Krishna Chandra singh,
Why Study History
• Today’s languages are only explicable by examining how
they grew up
– For example, must look at their development to understand why
FORTRAN and COBOL are still in use after more than 40 years
– Also must see how C happened to understand why the syntax is the
way it is
• To pinpoint some past errors and “prevent history from
repeating itself”
– That’s what they always say, but history repeats itself anyway!
– In programming languages, the microprocessor-based languages
had the same troubles that big machine language had decades ago
Early Machines
• Early language were called order codes or
instruction codes
• Were very primitive, even compared to
assembly languages
• Used numbers for memory locations as well as
operation codes (opcodes)!
• No I/O or primitive I/O instructions
• Loops were primitive jumps or not much better
• Libraries were inserted into the programs that
use them, not called as subroutines
FORTRAN
• Stands for “The IBM Mathematical FORmula
TRANslating system”
• John Backus was team leader
• First manual 1956
• First successful compiler 1958
• Took 18 person-years to write compiler!
• Motivating factor behind the language was the economy,
not the beauty of programming in a mathematical
notation
– Programming and debugging costs exceeded running costs, and
were getting worse as computers became faster
– The only solution seemed to be to design a language for
scientific computations that allowed programmer to use
mathematical notation itself
– Must be done such that compiler could produce efficient object
code
FORTRAN Features
• Assignment statements are scientific formulas of some
complexity
• Comments allowed
• DO loops are simple to write
• Subroutines and function subroutines
– Call statements look like math formulas
• Formats for I/O, much less painful than I/O on early
computers
• Machine independence!
• Early compilers were remarkably good
• But still didn’t produce code as efficient as hand-coded
(machine language) code
Reasons for FORTRAN’s
Success
• Made efficient use of programmers’ time
compared to assembly language
• Easy to learn, opened door to computer for non-
specialist programmers
• Supported by IBM, soon to become the most
powerful firm in computing.
– IBM and FORTRAN grew together
• Right for scientific users, which is good because
most applications and users were scientific at
the time
A FORTRAN Program
• See code folder for the code itself
• Needs open and close statements for this to work with
files instead of punched cards
• The first 2 lines are comments
• Arrays must be declared, with size given (3rd
line)
• Algol (later) allows array with variable bounds,
FORTRAN doesn’t
• Most FORTRAN variables are declared implicitly by use
• MEAN, however, was explicitly declared as real
• If not declared, it would be integer since it started with a
letter between I and N.
Problems related to FORTRAN
• Main problem being that programmers
were reluctant to learn any other
languages!
• They would use FORTRAN even when it
didn’t have the appropriate features
• For example, people would use
FORTRAN for
– data processing (business) applications, and,
– interactive computing!
More FORTRAN Problems
• No standard until 1966
• FORTRAN 77, 1978
– From my own recollection, it had “else”
– g77 on linux on CS01
– File I/O via open and close stmts like in
our code example
• FORTRAN 90, 1991
– Supports many new features
• Allocation of space for arrays on block
entry!
• Records
• Modules
• Pointers!!
• Also allowed all old (FORTRAN 77)
features for legacy programs
ALGOL (Algorithmic Language)
• As FORTRAN developed in the 50’s,
many of the same people realized the
importance of standardization
• Whereas FORTRAN was one company’s
product (IBM), ALGOL was developed by
a joint European-American committee
• FORTRAN was great for efficiency, ease
of learning, and having a high-level
language at all!
ALGOL Goals
• Should be as close as possible to standard math
notation
• Readable without too much additional
explanation or even comments
– Self-documenting code
• Can be used for describing computing
processes (algorithms) in publications
– A language for publication as well as for machine use
• Mechanically translatable into machine code (Of
course!! But actually few Algol compilers
seemed to exist!!)
ALGOL Versions
• ALGOL 58 was first version, never implemented!
• ALGOL 60 was next; incorporated criticisms of
ALGOL 58
• Report for the “60” was an important event in
history of computing
• Revised report, 1963, was a classic
• Why so much song and dance for a language
that was never popular (at least in the U.S.)?
– Many concepts were introduced (next slide)
ALGOL Concepts
• Language definition
– BNF was used to define the syntax for the first time
– This concept led to syntax-directed compilers
• Structured
– Was the original block-structured language!
– Variables weren’t visible outside the block in which they were declared
• Arrays can have variable bounds at compile time
– Bounds must be fixed when entering block in which the array was
declared at run time
– Can even have bounds like a[m:n, p:q], or complicated expressions for
the bounds
• Contained several structured control statements
– if-else for, while (nesting OK),
– Later some of these were exported to FORTRAN
• Recursion introduced for the first time!
– Then thought to be useless “academic” concept
– Couldn’t figure out how to compile them efficiently
Reasons for ALGOL’s lack of
success
• FORTRAN came out 2-3 years earlier than
ALGOL 60, and programmers already got used to
the former
• ALGOL had more features, and so was harder to
learn
• IBM initially supported ALGOL, but since
FORTRAN had lots of customers, IBM ignored
ALGOL
• Great success of IBM in the 60’s boosted
FORTRAN, and vice versa
• FORTRAN compilers were much simpler and
produced faster code than ALGOL compilers
ALGOL W (1966)
• Essentially a tidying up of Algol 60 with several important
new features
• Well liked by users, though there weren’t that many of
them
• Developed by Niklaus Wirth (ETH) and C.A.R. Hoare
• Records and references (pointers!)
• Case statement
• For statement conditions were more restricted and less
error-prone
• Procedure and function parameters could be called:
– By value
– By result
– By value-result
More ALGOL W Features
• Long real and complex data types allow
storage and arithmetic on long real and
complex numbers!
• Bits datatype for low-level processing!
• Some string facilities, but primitive
• Assert statements allow assertions to be
tested during a run
ALGOL 68
• Goal was to come up with a core language with a
small number of powerful constructs
– IBM’s PL/I, on the contrary, was very comprehensive
• Some of these constructs were so general that
they were confusing – an overkill
– Very general sequence generation for indices in loops
• Orthogonality was a major design goal
– If a feature worked in one situation, it is likely to work in
other situations as well
• Overall far too complicated to be successful
– Initial specification was so abstruse that simple guides
were produced before even partial acceptance of the
language
Pascal
• Developed by Niklaus Wirth of the ETH in
the late 60’s and early 70’s
• Built on his earlier work on Algol W
• Meant primarily for teaching
– Structured programming
• To beat FORTRAN, must have fast
compiler that generates efficient code
• Became the primary teaching language in
the world by mid-80’s
PASCAL features
• Inclusion of features that encourage well-written and well-structured
program
– Really meant for teaching
– Data types are a prominent feature of Pascal
• Integer
• Real
• Boolean
• Char
• Enumeration types
• Structured user-defined types include
– Arrays
– Records
– Sets
– File
• Not rich in features for systems programming (bit-twiddling)
– But some people used Pascal for systems programming anyway!
Business DP Languages
• COBOL was the major one, still in use today!
• Grace Hopper was the leader
• DoD
• Places strong emphasis on data and file
processing
• Credited with the idea of “record” although
ALGOL W also had that.
• Looks boring to scientific programmers
• Verbose, supposedly to seem natural to
business data processing people
General or multipurpose
languages
• There used to be a clear distinction between
business and scientific programmers
• Even in the late 50’s and early 60’s, language
designers started to work on integrating scientific
and business languages
• First was JOVIAL (Jules’ Own Version of the
International Algebraic Language (ALGOL 58))
• But PL/I was the main language in this category
PL/I
• Supported by IBM
• Was to replace FORTRAN and COBOL
• Combined ideas from these languages, as
well as ALGOL (block structure), LISP (list
processing, and others
• Designed by a committee of IBMers and
users
More on PL/I
• How do you make a language big but supposedly not overwhelming
to learn?
• “Default” was key idea
– Everything has a default way of being
– If you were just learning a feature, you might not have even known other
options existed
• When IBM wanted to quit FORTRAN and COBOL support and go for
PL/I, customers protested.
– PL/I died, and the two older languages lived.
• See PL/I example in book.
• However PL/I also has string and file processing capabilities, making
it useful for business DP as well
– More concise syntax than COBOL
Developing Programs Interactively
• FORTRAN, COBOL, and ALGOL (and especially
PL/I!) were slow to compile in those days
• BASIC was invented at Dartmouth College in the
mid 60’s by Kemeny and Kurtz
• BASIC was easy to compile and learn by students
and non-experts
• Easy enough to type on terminals (which were
frustrating things even in the mid 70’s)
• Simple enough to compile even in the new
microcomputers of the 70’s
– BASIC caught on in a big way
– Microsofts’ VB was based on an OO-extension of
BASIC
APL
• Designed by Iverson as a mathematical language
• For concise description of math algorithms
• Originally contained a large number of operators
• Trimmed down once implemented, but still very
rich
• Was once a highly-respected language
• APL has a large alphabet, and these unusual
characteristics:
– The primitive objects are arrays (lists, tables, or
matrices)
– It’s an operator-driven language, branches not used
much
– No operator precedence, just left to right
Special-Purpose Languages
• String manipulation languages
– COMIT
– SNOBOL
• List-processing languages
– IPL-V
– LISP
Principal Features of LISP
• Performs computations with symbolic expressions more
than with numbers
– Good for AI
• Represents symbolic expressions and other info in the
form of list structures in memory
• Uses small set of constructor and selector operations to
create and extract info from lists
– These operations are expressed as functions and use the
mathematical idea of the composition of functions as a means of
constructing more complex functions
• Recursive control is more natural than iterative control!!
– Very controversial in the old days
• Data and program are equivalent forms. Thus programs
can be easily modified like data!
– Idea of automatic programming
Other LISP features
• Probably the first language to implement
garbage collection!
• Close to a pure functional language
– Has as its fundamental operation the
evaluation of expressions
• Interactive
• ELEGANT – helped lead to its survival
Simulation Languages
• Used for simulating discrete systems
– Among the first problems solved by computers
– These simulations involve complex discrete or discretized systems
– Traffic simulation, for example
• GPSS – first widely-used simulation language
– First described in 1961
– Available to programmers a bit later
– Based on block diagrams
– Made it easy to develop simulation models (programs) but slow to
execute, at least in those days
• SIMULA
– Developed in the 60’s at the Norwegian Computing Centre (Dahl and
Nygaard)
– Simula ’67 was the best known version
– Based on Algol ’60 with one very important addition, the CLASS
concept!
• Became key concept in modern object-oriented programming!
• Could be called the first object-oriented programming language
Scripting languages
• Arose out of batch files, batching commands together
• One common task in programming is to analyze or convert text from one
form to another
• In these tasks, pattern matching is important
• Special-purpose languages such as awk was developed for these
purposes
• UNIX shell scripts
• Perl combined power of awk with C-like syntax for better general
programming
• Perl has grown into a very large language with object-oriented and Web
programming support
• Often, a Web client and server need to communicate with each other
• This is done through what’s known as the Common Gateway Interface
(CGI)
• Perl is one of the most popular languages for writing CGI scripts.
– Other languages for that purpose include Python Tcl, and Javascript
– Can also write CGI scripts in more conventional languages but it’s less
convenient to do so
Perl Variables
• Variables are typeless, but are classified as
scalar, array, or hash
• Scalar (prefix $)
– Number, always stored as double precision numbers
– String
• Array (prefix @)
• Hash or associative array (prefix %)
– %month = (“April” => 30, “May” => 31, “June” => 30);
– $month(“July”) = 31;
– Note the $!!
Perl Pattern Matching
• Just like ed in UNIX
• To change “Hi, there” to “Hello there” write
$string1 =~ s/I,/ello/;
Then the statement
$string2 =~tr/a-m/A-M/;
Will transform each lowercase letter in the
range a-m to their uppercase counterpart!

Computer history krishna

  • 1.
  • 2.
    Why Study History •Today’s languages are only explicable by examining how they grew up – For example, must look at their development to understand why FORTRAN and COBOL are still in use after more than 40 years – Also must see how C happened to understand why the syntax is the way it is • To pinpoint some past errors and “prevent history from repeating itself” – That’s what they always say, but history repeats itself anyway! – In programming languages, the microprocessor-based languages had the same troubles that big machine language had decades ago
  • 3.
    Early Machines • Earlylanguage were called order codes or instruction codes • Were very primitive, even compared to assembly languages • Used numbers for memory locations as well as operation codes (opcodes)! • No I/O or primitive I/O instructions • Loops were primitive jumps or not much better • Libraries were inserted into the programs that use them, not called as subroutines
  • 4.
    FORTRAN • Stands for“The IBM Mathematical FORmula TRANslating system” • John Backus was team leader • First manual 1956 • First successful compiler 1958 • Took 18 person-years to write compiler! • Motivating factor behind the language was the economy, not the beauty of programming in a mathematical notation – Programming and debugging costs exceeded running costs, and were getting worse as computers became faster – The only solution seemed to be to design a language for scientific computations that allowed programmer to use mathematical notation itself – Must be done such that compiler could produce efficient object code
  • 5.
    FORTRAN Features • Assignmentstatements are scientific formulas of some complexity • Comments allowed • DO loops are simple to write • Subroutines and function subroutines – Call statements look like math formulas • Formats for I/O, much less painful than I/O on early computers • Machine independence! • Early compilers were remarkably good • But still didn’t produce code as efficient as hand-coded (machine language) code
  • 6.
    Reasons for FORTRAN’s Success •Made efficient use of programmers’ time compared to assembly language • Easy to learn, opened door to computer for non- specialist programmers • Supported by IBM, soon to become the most powerful firm in computing. – IBM and FORTRAN grew together • Right for scientific users, which is good because most applications and users were scientific at the time
  • 7.
    A FORTRAN Program •See code folder for the code itself • Needs open and close statements for this to work with files instead of punched cards • The first 2 lines are comments • Arrays must be declared, with size given (3rd line) • Algol (later) allows array with variable bounds, FORTRAN doesn’t • Most FORTRAN variables are declared implicitly by use • MEAN, however, was explicitly declared as real • If not declared, it would be integer since it started with a letter between I and N.
  • 8.
    Problems related toFORTRAN • Main problem being that programmers were reluctant to learn any other languages! • They would use FORTRAN even when it didn’t have the appropriate features • For example, people would use FORTRAN for – data processing (business) applications, and, – interactive computing!
  • 9.
    More FORTRAN Problems •No standard until 1966 • FORTRAN 77, 1978 – From my own recollection, it had “else” – g77 on linux on CS01 – File I/O via open and close stmts like in our code example • FORTRAN 90, 1991 – Supports many new features • Allocation of space for arrays on block entry! • Records • Modules • Pointers!! • Also allowed all old (FORTRAN 77) features for legacy programs
  • 10.
    ALGOL (Algorithmic Language) •As FORTRAN developed in the 50’s, many of the same people realized the importance of standardization • Whereas FORTRAN was one company’s product (IBM), ALGOL was developed by a joint European-American committee • FORTRAN was great for efficiency, ease of learning, and having a high-level language at all!
  • 11.
    ALGOL Goals • Shouldbe as close as possible to standard math notation • Readable without too much additional explanation or even comments – Self-documenting code • Can be used for describing computing processes (algorithms) in publications – A language for publication as well as for machine use • Mechanically translatable into machine code (Of course!! But actually few Algol compilers seemed to exist!!)
  • 12.
    ALGOL Versions • ALGOL58 was first version, never implemented! • ALGOL 60 was next; incorporated criticisms of ALGOL 58 • Report for the “60” was an important event in history of computing • Revised report, 1963, was a classic • Why so much song and dance for a language that was never popular (at least in the U.S.)? – Many concepts were introduced (next slide)
  • 14.
    ALGOL Concepts • Languagedefinition – BNF was used to define the syntax for the first time – This concept led to syntax-directed compilers • Structured – Was the original block-structured language! – Variables weren’t visible outside the block in which they were declared • Arrays can have variable bounds at compile time – Bounds must be fixed when entering block in which the array was declared at run time – Can even have bounds like a[m:n, p:q], or complicated expressions for the bounds • Contained several structured control statements – if-else for, while (nesting OK), – Later some of these were exported to FORTRAN • Recursion introduced for the first time! – Then thought to be useless “academic” concept – Couldn’t figure out how to compile them efficiently
  • 15.
    Reasons for ALGOL’slack of success • FORTRAN came out 2-3 years earlier than ALGOL 60, and programmers already got used to the former • ALGOL had more features, and so was harder to learn • IBM initially supported ALGOL, but since FORTRAN had lots of customers, IBM ignored ALGOL • Great success of IBM in the 60’s boosted FORTRAN, and vice versa • FORTRAN compilers were much simpler and produced faster code than ALGOL compilers
  • 16.
    ALGOL W (1966) •Essentially a tidying up of Algol 60 with several important new features • Well liked by users, though there weren’t that many of them • Developed by Niklaus Wirth (ETH) and C.A.R. Hoare • Records and references (pointers!) • Case statement • For statement conditions were more restricted and less error-prone • Procedure and function parameters could be called: – By value – By result – By value-result
  • 17.
    More ALGOL WFeatures • Long real and complex data types allow storage and arithmetic on long real and complex numbers! • Bits datatype for low-level processing! • Some string facilities, but primitive • Assert statements allow assertions to be tested during a run
  • 18.
    ALGOL 68 • Goalwas to come up with a core language with a small number of powerful constructs – IBM’s PL/I, on the contrary, was very comprehensive • Some of these constructs were so general that they were confusing – an overkill – Very general sequence generation for indices in loops • Orthogonality was a major design goal – If a feature worked in one situation, it is likely to work in other situations as well • Overall far too complicated to be successful – Initial specification was so abstruse that simple guides were produced before even partial acceptance of the language
  • 19.
    Pascal • Developed byNiklaus Wirth of the ETH in the late 60’s and early 70’s • Built on his earlier work on Algol W • Meant primarily for teaching – Structured programming • To beat FORTRAN, must have fast compiler that generates efficient code • Became the primary teaching language in the world by mid-80’s
  • 20.
    PASCAL features • Inclusionof features that encourage well-written and well-structured program – Really meant for teaching – Data types are a prominent feature of Pascal • Integer • Real • Boolean • Char • Enumeration types • Structured user-defined types include – Arrays – Records – Sets – File • Not rich in features for systems programming (bit-twiddling) – But some people used Pascal for systems programming anyway!
  • 21.
    Business DP Languages •COBOL was the major one, still in use today! • Grace Hopper was the leader • DoD • Places strong emphasis on data and file processing • Credited with the idea of “record” although ALGOL W also had that. • Looks boring to scientific programmers • Verbose, supposedly to seem natural to business data processing people
  • 22.
    General or multipurpose languages •There used to be a clear distinction between business and scientific programmers • Even in the late 50’s and early 60’s, language designers started to work on integrating scientific and business languages • First was JOVIAL (Jules’ Own Version of the International Algebraic Language (ALGOL 58)) • But PL/I was the main language in this category
  • 23.
    PL/I • Supported byIBM • Was to replace FORTRAN and COBOL • Combined ideas from these languages, as well as ALGOL (block structure), LISP (list processing, and others • Designed by a committee of IBMers and users
  • 24.
    More on PL/I •How do you make a language big but supposedly not overwhelming to learn? • “Default” was key idea – Everything has a default way of being – If you were just learning a feature, you might not have even known other options existed • When IBM wanted to quit FORTRAN and COBOL support and go for PL/I, customers protested. – PL/I died, and the two older languages lived. • See PL/I example in book. • However PL/I also has string and file processing capabilities, making it useful for business DP as well – More concise syntax than COBOL
  • 25.
    Developing Programs Interactively •FORTRAN, COBOL, and ALGOL (and especially PL/I!) were slow to compile in those days • BASIC was invented at Dartmouth College in the mid 60’s by Kemeny and Kurtz • BASIC was easy to compile and learn by students and non-experts • Easy enough to type on terminals (which were frustrating things even in the mid 70’s) • Simple enough to compile even in the new microcomputers of the 70’s – BASIC caught on in a big way – Microsofts’ VB was based on an OO-extension of BASIC
  • 26.
    APL • Designed byIverson as a mathematical language • For concise description of math algorithms • Originally contained a large number of operators • Trimmed down once implemented, but still very rich • Was once a highly-respected language • APL has a large alphabet, and these unusual characteristics: – The primitive objects are arrays (lists, tables, or matrices) – It’s an operator-driven language, branches not used much – No operator precedence, just left to right
  • 27.
    Special-Purpose Languages • Stringmanipulation languages – COMIT – SNOBOL • List-processing languages – IPL-V – LISP
  • 28.
    Principal Features ofLISP • Performs computations with symbolic expressions more than with numbers – Good for AI • Represents symbolic expressions and other info in the form of list structures in memory • Uses small set of constructor and selector operations to create and extract info from lists – These operations are expressed as functions and use the mathematical idea of the composition of functions as a means of constructing more complex functions • Recursive control is more natural than iterative control!! – Very controversial in the old days • Data and program are equivalent forms. Thus programs can be easily modified like data! – Idea of automatic programming
  • 29.
    Other LISP features •Probably the first language to implement garbage collection! • Close to a pure functional language – Has as its fundamental operation the evaluation of expressions • Interactive • ELEGANT – helped lead to its survival
  • 30.
    Simulation Languages • Usedfor simulating discrete systems – Among the first problems solved by computers – These simulations involve complex discrete or discretized systems – Traffic simulation, for example • GPSS – first widely-used simulation language – First described in 1961 – Available to programmers a bit later – Based on block diagrams – Made it easy to develop simulation models (programs) but slow to execute, at least in those days • SIMULA – Developed in the 60’s at the Norwegian Computing Centre (Dahl and Nygaard) – Simula ’67 was the best known version – Based on Algol ’60 with one very important addition, the CLASS concept! • Became key concept in modern object-oriented programming! • Could be called the first object-oriented programming language
  • 31.
    Scripting languages • Aroseout of batch files, batching commands together • One common task in programming is to analyze or convert text from one form to another • In these tasks, pattern matching is important • Special-purpose languages such as awk was developed for these purposes • UNIX shell scripts • Perl combined power of awk with C-like syntax for better general programming • Perl has grown into a very large language with object-oriented and Web programming support • Often, a Web client and server need to communicate with each other • This is done through what’s known as the Common Gateway Interface (CGI) • Perl is one of the most popular languages for writing CGI scripts. – Other languages for that purpose include Python Tcl, and Javascript – Can also write CGI scripts in more conventional languages but it’s less convenient to do so
  • 32.
    Perl Variables • Variablesare typeless, but are classified as scalar, array, or hash • Scalar (prefix $) – Number, always stored as double precision numbers – String • Array (prefix @) • Hash or associative array (prefix %) – %month = (“April” => 30, “May” => 31, “June” => 30); – $month(“July”) = 31; – Note the $!!
  • 33.
    Perl Pattern Matching •Just like ed in UNIX • To change “Hi, there” to “Hello there” write $string1 =~ s/I,/ello/; Then the statement $string2 =~tr/a-m/A-M/; Will transform each lowercase letter in the range a-m to their uppercase counterpart!