next up previous contents
Next: Changes in the Up: Changes in the Previous: New Random Number

Changes in the Object System

The object system now uses a method cache that should significantly improve dispatch for methods in deep object hierarchies.

To help with compilation, the way in which the current object is passed to functions slot-value , call-next-method  and call-next-method  has changed. These functions should only be called in the dynamic extent of a method call. Their use outside of this scope, for example in a function closure returned by a method, is undefined.

The current implementation uses a dynamic binding to store the current object. This works, but makes tail recursion optimization on methods impossible. I may need to make a major change in which things like slot-value  and call-next-method  become macros. The main implication of this is that (apply #'call-next-method ...) constructs won't work and will have to be handled by something like an apply-next-method macro. Since this is likely to break a fair bit of code I will think about it before doing it, but at this point a change along these lines look fairly likely.
A more substantial revision of the object system may occur soon in which the current system remains more or less unchanged but becomes just one possible system among many supported by a metaobject protocol. This should allow experimentation with variations in the object system that might be helpful.




Luke Tierney
Wed Feb 26 05:25:18 CST 1997