Ian Bicking: the old part of his blog


Scott: in some new thinking along these lines I've used classes instead of instances, and __call__ creates a new anonymous class. This way you get the parent/child relationship. I haven't tested the performance of this -- it could mean a lot of new classes, and I don't know how fast that is compared to instance creation.

The other issue with using classes is that you can't really use them. You really want to use a singleton associated with the class (which I create upon class creation). Unfortunately this is annoying. Maybe I could put a __getattr__ in the metaclass and delegate all the calls to the metaclass to the instance, but I don't know how well that will work.
Comment on Self and Prototype-based Programming
by Ian Bicking