CS374: History of Programming Languages

Bill Mongan

Evolution of Language

Programming Languages Through the Years

Machine Language

  • Look up the opcode and manipulate registers directly (add, subtract, etc.)
Instruction Type Opcode (6 bits) Data (26 bits)
R-Type xxxxxx rs (5), rt (5), rd (5), shift (5), function (6)
I-Type xxxxxx rs (5), rt (5), immediate (16)
J-Type xxxxxx 26-bit address

Ada Lovelace Programs Babbage’s Analytical Engine

  • 1840: Babbage’s Analytical Engine design

Diagram for the computation of Bernoulli numbers

Zuse Plankalkul

  • Conceptual High-Level Language in the 1940’s
  • Local boolean variables (just 1 bit!)
    • User-defined types and arrays allowed
  • Pass-by-value
  • Conditionals and iteration

Imperative Languages

  • One step at a time
  • Manipulate a variable
  • Procedures are compositions of these imperative instructions
LET x = x + 1
LET y = x * 2

Fortran

  • 1957: Formula Translator

FortranCardPROJ039.agr

Fortran

  • 3-Way IF statements (0, negative, positive)
  • DO Loops
  • Subroutines
  • Semantics: Variables beginning with the letters I through N assumed to be integers

COBOL

  • 1959: Common Business Oriented Language
  • DoD CODSYL committee effort based on Grace Hopper’s FLOW-MATIC design
  • Data records (similar to a linked list)
  • Code block demarcation i.e. END-IF
  • GO TO staetments

BASIC

AtariBasic

C

  • 1972: Dennis Ritchie
  • long and unsigned data types
  • static variable scope
  • Weak, unenforced types define data “shape” but not contents
  • Pointers

Python

  • 1991: Interpreted Language
  • Extensive Library System
  • Return of indented code blocks
  • Dynamic typing and Garbage Collection

Declarative Languages

  • Statements describe the outcome, not the implementation
  • Concise, easy to write, but complex instructions can be more difficult to read
arr = np.array([0, 1, 2, 3, 4, 5])
evens = np.where(arr % 2 > 0, arr*2, arr)

Declartaive Paradigms: Logic Programming

prereq(cs173, cs174).
prereq(cs174, cs374).
?- prereq(cs173, cs174).
Yes

Declarative Paradigms: Functional Programming

  • 1970’s: Scheme - Descendent of List Processor (LISP, 1958)
  • Composition of local functions that operate on tuples with minimal side effects
(define square
  (lambda(n)
    (* n n)))
      
(square 5)

Object-Oriented Languages

  • Generally imperative with declarative infusion
  • Oriented around manipulating data structures
  • Encapsulation, Polymorphism, Inheritance

Smalltalk

Ada

C++

  • 1985: Descendant of C
  • Combine the low-level nearness to the machine of C with high level object abstractions
  • References as an abstraction of pointers
  • Significant standard template library

Java

Today

  • A blend of popular ideas