A Core Of Programming

NOTE-HXA7241-20100706T2216Z

Harrison Ainsworth

A few key structures that most programming languages share

Much talk about languages is really only about how they look. But there is a core of a few concepts that practically all share, and that is the truly important part.

When learning a language and when using a language, let the various details fall into the background. Focus on thinking and building with the following:

Three algorithmic structures
  • Procedure
  • Condition
  • Iteration
Two typing structures
  • Product – C ‘struct’
  • Sum – C ‘union’
Two data compounds
  • List/Array
  • Dictionary
Three data primitives
  • Boolean
  • Number
  • String
Two declaratives
  • Let/Set – name definition
  • Literal – data value

And perhaps:

Three list comprehensions
  • Filter
  • Map
  • Fold

Practically all software is made of these. These are the ‘load-bearing mechanisms’. They constitute a virtual common meta-language.

If one thinks with these first, and realises them simply and straightforwardly in the particular language, the software becomes that much easier to understand and translate.