Transcript Hopl

Welcome to the CIS Seminar
Fall, 2006
Taking this for Credit
You’ll do a ½ hour presentation (or you and
a friend will do a 1 hour presentation).
This presentation includes background and
discussion in the wiki.
You need to participate
You need to attend every week.
Grading
Presentation: 50%
Participation & Attendance: 50%
About Your Presentation
We will pick topics today if possible.
You need to do background research (hint: Google
doesn’t yet cover all information in the universe!
Try the library …)
You need to make a good wiki page, including
discussion prompts or problems.
You need to make good slides
You need to practice! I will ask for a trial run at
least 3 days before. If you’re not ready I’ll ask
for more trial runs.
Scheduling
• History of programming languages (Prof Peterson)
• Haskell (Prof Peterson)
• Mathematica as a programming language (Prof Keck)
• Hindley-Milner Type systems (Daniel)
• Computer camp wrapup (Prof Peterson)
• Ruby on Rails (Tim)
• Internship report (Kate)
• Running CMT (Randy Spydell)
• Alex Chiang (HP)
• Tim Chamilard (UCCS)
• Gareth Eaton (DU)
• Eric Friedman (CNet)
• Kate's Dad (???)
• Amanda Tarr (Some crazy game company)
Possible Student talks: C++ and templates , Prolog, Snobol / Icon,
This Term’s Theme
Programming Languages!
A Brief History of Programming
Languages
Computer Science is unique in that no one
language of expression has emerged to
supplant all others.
Most other disciplines have one "official"
language:
* standard music notation
* standard math notation
* standards for blueprints & technical
descriptions
Why So Many Languages?
What keeps computing from having one standard
language that absorbs all others??
In The Beginning
Computers were really expensive!
Few programs.
Just write everything in the native language
of the machine.
LDQ
FMP
STO
LDQ
FMP
FAD
STO
X
X
SUM
Y
Y
SUM
SUM
CALCULATE X * X
CALCULATE Y * Y
X*X+Y*Y
STORE SUM
Old IBM
Assembly
1954
The First Real PL: Fortran
It soon became obvious that
assembly was hard to write and
hard to understand. Mathematicians
wanted to use more familiar notation.
A Fortran II example written by
John Backus
Fortran Innovations
* Math notations (infix expressions)
* Basic control structures: IF, DO loops,
subroutines / functions
* No real linker – "Common Blocks" were a
substitute
* Column oriented syntax (punched cards)
1958
Lambda Calculus Strikes!
Lisp was a language WAY ahead of it's time!
John McCarthy proposed a language based
on lambda-calculus and S-expressions
(pairs).
Lisp Innovations
* Automatic Storage Management
* Purely functional subset
* Defined by a meta-interpreter
* Syntactic simplicity
* Single recursive structure type
Lisp is still alive and well – nowadays it's
called "Python"
1958
Algol
Algol = "Algorithmic Language"
Algol was a language for both programming
and formal description of algorithms.
Contributions of Algol
* First language with "Modern" syntax
* A language of scholarly publication
* Better "function call" mechanism – more
descriptive
* Led to Pascal and eventually Java
* Adopted as the "machine language" by
Burroughs
1959
COBOL
Cobol was a language designed
to fill the needs of the business
community (mathematicians and other
shady academics were responsible for the
other languages!)
It was influenced by Grace Hopper's ideas in
Flow-Matic.
Pity the Cobol Programmer
MULTIPLY B BY B GIVING B-SQUARED.
MULTIPLY 4 BY A GIVING FOUR-A.
MULTIPLY FOUR-A BY C GIVING FOUR-A-C.
SUBTRACT FOUR-A-C FROM B-SQUARED GIVING
RESULT-1.
COMPUTE RESULT-2 = RESULT-1 ** .5.
SUBTRACT B FROM RESULT-2 GIVING NUMERATOR.
MULTIPLY 2 BY A GIVING DENOMINATOR.
DIVIDE NUMERATOR BY DENOMINATOR GIVING X.
Cobol Innovations
* Extensive I/O capabilities
* Natural language (why?)
* Abandoned native numeric representation
* Emphasized data layout (nested naming)
This is the language that will not die. You
could earn big $$$ becoming a Cobol
programmer.
1962
APL
Ken Iverson was probably the first
"mad genius" to design a programming
that was completely unprecedented and
unique.
Good luck figuring this one out:
APL Contributions
* An amazing economy of expression
* Extreme functional programming – many
APL operators made it into Haskell
* Explored the difficulty of introducing new
symbols into the PL
* Everyone knew about APL but nobody
actually used it except crazy math dudes
* Still alive as the "J" programming language
1962
Simula
External Class Geometry;
Geometry Begin
! Subclasses declared in the prefixed block: ;
Point Class Color_Point(C); Character C; Begin ...
End;
Rectangle Class Square; Begin ... End;
! Variables declared in the prefixed block: ;
Ref(Color_Point) A1;
Ref(Point) C, D;
Ref(Circle) K;
Ref(Line) E, F;
Ref(Rectangle) R1;
Ref(Square) S1;
! Block body: ;
C :- New Point(5,6);
D :- New Point(20,30);
A1 :- New Color_Point(3, 4, 'G');
K :- New Circle(10, C);
E :- New Line(C, D);
F :- X;
K.Shift (1,1);
R1 :- New Rectangle("Rec_R1", 5, 4);
S1 :- New Square("Square_S1", 4, 6);
S1.Show;
End of prefixed block;
Simula expanded on Algol to add
objects, classes, methods, GC.
It is the ancestor of object
oriented programming.
Ole-Johan Dahl and Kristen Nygaard
Simula
* Simula was designed for discrete event
based simulation – something that O-O
does very well!
* It took a long time for O-O ideas to hit the
mainstream (C++)