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

Object mathod inheritance



   From: Bruce Krulwich <krulwich-bruce@yale.arpa>
   Date: Fri, 8 Jul 88 16:45:18 EDT


   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.  For example,

	   (object nil
	     ((print self port) (format port "zowie"))
	     (=> default-handler))

   would use DEFAULT-HANDLER's method clauses for all methods other than PRINT.

   Does this functionality still exist??  JOIN will accomplish a similar thing,
   but (1) I would prefer to do it at object definition time, and (2) I want to
   do this will structures, which are not (yet) supported by JOIN.


   Bruce Krulwich
   -------



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")))
   		 default-handler)


so I'm not sure what you mean by 'do it at object definition time'.


Also, as far as I know join works on structures.  Please report a bug if it
doesn't.

	-David