Frontier Software

Robert Laing's programing notes


By Robert Laing

The list is the origin of culture. It’s part of the history of art and literature. What does culture want? To make infinity comprehensible. It also wants to create order. — Umberto Eco in a Spiegel interview on the importance of lists

We learn binary infix operators — 1 + 3, 1 - 3, 1/3, 1*3, p ∧ q, … — very early in school. These involve rote learning arbitrary prececence rules to sidestep ambiguity, and are generally intellectually crippling. We typically have to unlearn this stuff in higher education, switching from infix to prefix operators to handle arbitrarily-long lists of numbers to, say, get the financial bottom line of a profit & loss statement, balance sheet or whatever.

Summation ∑an makes life much easier for real world addition, and by replacing binary operator minus with a unitary negative sign, the same prefix handles subtraction.

Similarly in logic, we typically want to and or or and arbitrarily-long list of propositions, for which there are the ∀ and ∃ prefixes.

Something I found an eye-opener doing a MooC on compilers is that for whatever programming language, getting a computer to understand it involves rewriting it into a Lisp-like list of tokens, where the first element is usually a function or variable name. The compiler strips the syntactic sugar away to leave a nested list called an abstract syntax tree.

There’s a surplus of programing languages already, so I don’t recommend adding more. A joke list why your language will not work I’ve found a very handy taxonomy.

Though there’s rarely a need to write compilers, I’ve found understanding the basics of how they work a huge help in grasping concepts, and thinking of code as abstract syntax trees a big aid

?Term =.. ?List

Last updated on 2 Jan 2021
Published on 2 Jan 2021

Content Footer