In Erlang, single assignment is like algebra…

When I went to school, my math teacher said, “If there’s an X in several different parts in the same equation, then all the Xs mean the same thing.” That’s how we can solve equations: if we know that X+Y=10 and X-Y=2, then X will be 6 and Y will be 4 in both equations.

But when I learned my first programming language, we were shown stuff like this:
X = X + 1

Everyone protested, saying “you can’t do that!”. But the teacher said we were wrong, and we had to unlearn what we learned in math class. X isn’t a math variable: it’s like a pigeon hole/little box…

In Erlang, variables are just like they are in math. When you associate a value with a variable, you’re making an assertion - a statement of fact. This variable has that value. And that’s that.

In “Armstrong, Joe; Programming Erlang; The Pragmatic Programmers; 2007

Tags:, ,

In regards to real time…

By convention, this function increases at a rate equal to 9192631770 times the period of the radiation emitted by the transition between two hyperfine levels of the ground state atomic cesium 133, a time unit which people have agreed to call second,

In “Veríssimo P, Rodrigues L.; Distributed Systems for System Architects; KAP; 2001

Tags:,