Re: trouble understanding next-method and mixins

From: Shiro Kawai <shiro_at_squareusa.com>
Date: Mon, 28 Jun 1999 20:18:06 -1000 (HST)

I use mixin classes a lot, too. However, usually I assume mixin
classes are a sort of abstract classes and are always used in the
context of multiple inheritance, thus are never instantiated by
themselves.

Nevertheless, I sometimes don't want to bother about which method
is the "terminal" method and which has the next method. In such
case, I just write a fallback method:

STk> (define-method delete (self) (format #t "fallback method\n"))
STk> (delete y)
deleting boo #[<boo> 10172478]
deleting mixer #[<boo> 10172478]
fallback method

--
Shiro KAWAI
  Square USA Inc.   Honolulu Studio R&D division
#"The most important things are the hardest things to say" --- Stephen King
 
Received on Tue Jun 29 1999 - 08:19:21 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST