Programming is Math Proof: Structured Programming

Math Online Tom Circle

Keywords:

  • Dijkstra, Edge Wyber (born 1930 Rotterdam)
  • Goto is harmful
  • Structures: sequence, selection, iteration

Three Programming Paradigms:

1. Structured Programming (1968 Dijkstra)

  • Impose discipline on direct transfer of control aka “Goto“.
  • “If/ then /else, do/while” control structures are structured.

2. Object-Oriented ‘OO’ (1966 Ole Johan Dahl & Kristen Nygaard)

  • Impose discipline on Indirect transfer of control (polymorphism, ‘constructor‘ function of class, it’s local variables = instance variables).

OO = Combination of Data & Function.

3. Functional Programming (1958 John McCarthy’s LISP language, based on Math “Lambda Calculus” from Alonzo Church 1936).

  • Impose discipline upon assignment (side effect, immutability of data, Referential Transparency).

4. Any more ?

All Programs can be constructed from just 3 structures (Böhm and Jacopini, 1966):

Sequence / Selection / Iteration.

Dijkstra’s Math Proofs for:

1. Sequence – by simple enumeration.

  • Math Technique: trace the inputs…

View original post 72 more words

Author: tomcircle

Math amateur

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: