Smalltalk and Python

Darrell news at dorb.com
Thu Dec 14 22:53:01 EST 2000


Don't understand why allowing only a single bed within
a process would be handy?

Wouldn't dropping a bed instance into a scene be good enough?

must-be-missing-somethingly y'rs  - Darrell


"Greg Ewing" wrote:
> Just to throw another language into the mix,
> the TADS (Text Adventure Development System)
> lets you declare objects with multiple
> classes, e.g.
>
>    bed: Furniture, Surface, Scenery
>       ...
>
> declares a singleton object called 'bed'
> which belongs to the classes Furniture,
> Surface and Scenery.
>
> This is really just syntactic sugar, since
> you could just as well declare a new class
> inheriting from all those and then instantiate
> it. But it's extremely handy in a language
> designed for applications where the vast
> majority of objects tend to be singletons.
>
> To mention something vaguely Python-relevant:
> if Python had a convenient syntax for declaring
> singletons, it could be a pretty good language for
> Interactive Fiction...
>






More information about the Python-list mailing list