why cannot assign to function call

Mark Wooding mdw at distorted.org.uk
Tue Jan 6 23:20:26 EST 2009


rurpy at yahoo.com <rurpy at yahoo.com> wrote:

> Is not the proper term "aliasing"?  Perhaps Python "variables" should
> be called "alises".

No.  The proper term is most definitely `binding': see SICP, for
example.  (Wikipedia has a link to the full text.)

The topic of `aliasing' deals with a problem in compiler implementation,
where certain optimizations are valid only if two objects are known not
to share storage, so that mutating one won't alter the other.  This is a
particular problem for C, since C programs makes heavy use of pointers;
also, Fortran semantics allow the compiler to assume that aliasing does
not occur in a number of places, and C compiler writers are keen to keep
up with Fortran performance levels.

In a wider context, `aliases' tend to be /additional/ names for things,
with the connotation of being secondary to some primary or canonical
name.  For example, Linux 2.2 network interfaces had `aliases', which
were additional logical interfaces associated with the physical
interface, but with different (but related) names and distinct
addresses.  Nowadays, Linux network interfaces can have multiple
addresses anyway, and the idea of aliases is left as a compatibility
hack.

-- [mdw]



More information about the Python-list mailing list