I don't know Erlang at all, so I may not be able to give the best answer.
In Haskell, you don't write a program as a sequence of steps to be evaluated. Instead you define a collection of equations. Consequently the concept of "assignment" doesn't come up. When I write x = 1
in Haskell, this is not a directive to bind the name x
to the value 1, it is a declaration that x
is 1.
In Erlang, can you do anything at all with an unbound variable other than assign it? Even a construct that tests whether a variable is bound or not would make Erlang's single assignment quite different from Haskell's notion of variables. For that matter, if you can even try to read an unbound variable and have it throw an exception which you can then catch, that would make Erlang's single assignment quite different.
Again, this is due to Haskell not having a concept of assignment at all. An assignment is a step that happens at some point. There is the world before the assignment, in which the variable had its old value or was unbound, and the world after the assignment in which the variable has its new value. Each world is valid, and executing more steps in each world may have different results.
In Haskell, when I refer to x
either x
is in scope and defined, in which case it has a value, or its not in scope, in which case I haven't even written a Haskell program and the compiler will reject it. There is no before and after.
Given that a brief bit of googling indicates to me that variables can be unbound again in Erlang, I would say they are quite different concepts.