[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bindings and assignments




Michael Sperber <sperber@informatik.uni-tuebingen.de> writes:
> >>>>> "Perry" == Perry E Metzger <perry@piermont.com> writes:
> Perry> Is there any sort of straightforward definition of "binding" and
> Perry> "assignment" that one can reference to explain the distinction to
> Perry> people?
> 
> Binding means associating a name with a (fixed) value.  In your
> garden-variety imperative language, this means associating the name
> with a memory cell to hold a value.  Assignment means changing the
> contents of the memory cell associated with the variable: throwing out
> the old value, putting in a new one.

That's only true conceptually if variables are always using pointers
to the bound value, is it not? In many implementations, small values
like fixnums are not pointed to but are treated as specially tagged
immediate values, so the definition as given is a bit ambiguous (even
though we know what it means).

What I'm really looking for is a pair of definitions with a bit more
formalism that I can point people to.


-- 
Perry E. Metzger		perry@piermont.com