CS ExCo. Advanced in Topics Object-Oriented Programming. Connections Between: Functional & OO. Section 1: Language History. l -Calculus. Turing Machine. Why Do We Care?. Procedural Practical Little Math Grounding. Functional Programming Impractical Strong Mathematical Properties.
Advanced in Topics
Many Nice Mathematical properties
What is a “Hero” language?
No nested scopes
No statement grouping
No control structures
goto & computed goto
if (like computed goto)
do (based around labels)
Only locals & globals
No dynamic allocation
All locations picked at compile timeFortran (1957-66)
Achieved its goal to replace assembly
Got people to actually use programming languages
Hero? Or Villain?
DECLARE FOOBAR DECIMAL FIXED REAL (8,3) STATIC EXTERNAL
Allows anything, for example:
this is an acceptable name for a variable of type integer
Operator overloading, unions, pointers to anything, Call-by-reference
Everything is first class and transparent, including procedures
Yet: procedures are objects while structs “extend the language”, structures are based on arrays and one has data and programs and never shall the twain meetPL/I (1964) and Algol 68
Procedures with recursive calls
No true blocks, only compound statements
Record types extend type system
Based on arrays
Strongly typedPascal (1971-74)
Most importantly its simple!
This temporarily reversed the trend.
The first Object-Oriented Language!
The “Algol Wall” falls at last!
the same but
by syntax as
class ACCOUNT(balance); real balance;
begin integer acctNum;
accrNum := getNextAcctNum();
procedure DEPOSIT(amount); real amount;
balance := balance + amount;
ref (ACCOUNT) MyAcct;
MyAcct :- new ACCOUNT(45);