Assignment not the same as defining?

Greg Weeks weeks at vitus.scs.agilent.com
Wed Oct 3 12:25:44 EDT 2001


John J. Lee (jjl at pobox.com) wrote:
: On Wed, 3 Oct 2001, Oleg Broytmann wrote:

: > On Wed, Oct 03, 2001 at 12:35:58PM +0100, Dale Strickland-Clark wrote:
: [...]
: >    Python does not have assingment at all.
: > a = b
: >    is not assignment in Python - it is binding and rebinding. Reference to
: > b copied into a. Only reference, not an object.
: [...]

: true

But also false.  In other words, it is a matter of vocabulary.
Value-to-variable binding is essentially the same in Lisp as in Python, and
Lispers call it assignment.

Similarly, at least some Lispers would not say "Only reference, not an
object."  A reference is the address of a block of memory.  In the Lisp
community some time ago, it was taken for granted that the "object" was the
address.  But then the C community (and others perhaps) started asserting
that the "object" was the block of memory.  So, what old Lispers called
"objects" are now referred to as "references to objects".

Based on what I've seen, the old Lisp way of talking is dying out.  But
there is no law against the conceptual equation "object = address", and it
does simplify things overall, in my estimation.


Greg



More information about the Python-list mailing list