clarification on single assignment

Ulf Wiger etxuwig@REDACTED
Wed Nov 22 10:50:51 CET 2000


I read a paper on SAC (Single Assignment C):

"Multiple assignments within a block are permitted, i.e. an identifier
may be used more than once on the left-hand side of an assignment.
This does not contradict the functional paradigm since multiple
assignments are equivalent to nested (non-recursive) LET expressions.
Thus, the scope of an identifier simply extends over the sequence of
statements between two consecutive assignments to it. With this
interpretation in mind, it is perfectly legitimate to call SAC a
single assignment language. The Chuch Rosser property can nevertheless
be guaranteed at the level of entire blocks if they are taken as basic
units of strictly sequential computations."

http://www.informatik.uni-kiel.de/~sacbase/papers/sac-overview-norwich-94.ps.gz

I don't know exactly what all that means. I'm trying to figure out if
its anything more than a cop-out. It did strike me, however, that if
they were right (assuming the message is that SAC's version of single
assignment is as good as anybody else's), it ought to work for Erlang
too, since all Erlang functions are basic units of strictly sequential
computations.

Thus, we can reuse variable names in a function and lose nothing.
It also opens up for wonderful operators like ++ (oops! we already
have that) +=, =+ etc.  ;)

/Uffe
-- 
Ulf Wiger                                    tfn: +46  8 719 81 95
Senior System Architect                      mob: +46 70 519 81 95
Strategic Product & System Management    ATM Multiservice Networks
Data Backbone & Optical Services Division      Ericsson Telecom AB




More information about the erlang-questions mailing list