[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Object method inheritance

       In old versions of T is was possible to specify in an object's method
       list another object (or rather, a handler) to default to for calls to
       methods not defined for the object.

       [Example and discussion deleted]

    The (never released) syntax you refer to is not supported in T3.  As for
    the example you give, nothing says that
    	   (object nil
    	     ((print self port) (format port "zowie"))
    	     (=> default-handler))
    won't be implemented as (or even macro-expand into)
    	   (join (object nil ((print self port) (format port "zowie")))
Yes, but I would thought that it could be compiled much more efficiently.

    Also, as far as I know join works on structures.  Please report a bug if
    it doesn't.
JOIN works on structures in the sense that it will return an object that
correctly dispatches to the methods handled by the two structures, but the
resulting object cannot handle any slot manipulation defined by either of the
two original structures.  If JOIN on structures would be defined to handle
even just one of the structure's slot definitions it would be a useful thing,
but as of now it's fairly useless to JOIN structures.

[Note: the T3.0 release notes say "JOIN now works on procedures and objects
created by the object special form.  It does not yet work on structures or
primitive objects...]

Bruce Krulwich