For a solid grasp of SSA , program in Erlang.

SSA: Static single assignment (compiler technique).

Two Erlang properties make you write in SSA style (some would say force you):

  • immutability
  • the variables defined in a case-clause scope are accessible (some would say leaked, like in Python) in outer scope. Hence you cannot reuse names.

Some would add functional as a required property, but it derives from immutability. Some should better shut-up.

Instead of merely announcing "I've implemented this feature", you could mention victoriously "I mentally applied a dominance algorithm to minimise the number of variables". Audience, both male and female, will faint from exhilaration.

For more on this subject, this very short paper is eye-opening: SSA is Functional Programming.

view raw ssafun.md hosted with ❤ by GitHub

Comments