What is Expressiveness in a Computer Language

Rob Thorpe robert.thorpe at antenova.com
Tue Jun 20 19:32:32 CEST 2006

Pascal Costanza wrote:
> Matthias Blume wrote:
> > Pascal Costanza <pc at p-cos.net> writes:
> >> (slot-value p 'address) is an attempt to access the field 'address in
> >> the object p. In many languages, the notation for this is p.address.
> >>
> >> Although the class definition for person doesn't mention the field
> >> address, the call to (eval (read)) allows the user to change the
> >> definition of the class person and update its existing
> >> instances. Therefore at runtime, the call to (slot-value p 'adress)
> >> has a chance to succeed.
> >
> > I am quite comfortable with the thought that this sort of evil would
> > get rejected by a statically typed language. :-)
> This sort of feature is clearly not meant for you. ;-P

To be fair though that kind of thing would only really be used while
debugging a program.
Its no different than adding a new member to a class while in the

There are other places where you might add a slot to an object at
runtime, but they would be done in tidier ways.

More information about the Python-list mailing list