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

Re: I like to use method combination



  Date: Tue, 18 Oct 88 20:19 EDT
  From: Jim Salem <Salem@think.com>
  Subject: I like to use method combination
  To: common-loops@think.com
  Message-Id: <19881019001939.2.SALEM@POLYCARP.THINK.COM>
  
  
  PCL doesn't currently support CLOS's method combination.  However, I'd
  like to use another method combination type besides the standard one.
  
  Questions :
   - Will PCL support method combination anytime soon ?  When ?

Well, this is something planned, but we seem to be concentrating on
performance.

   - Has anyone tried to implement this in PCL already ?

Yes, we have one which we are trying to make available.  We expected
PCL to have this so we didn't push it too hard.  But, everything seems
to take longer than we expect....  
  
  Since those are probably both NO, I'm willing to dive in and try to
  implement it but I'd like a little info/help.
  
  My strategy is to add a method-combination slot to the
  standard-generic-function class (in defs.lisp) and then modify the
  appropriate function(s) in combin.lisp to generate the appropriate code.

Yes, our approach was to just use a slot that wasn't currently use.

  A cursory reading of combin.lisp suggests the only function I need modify
  is COMPUTE-EFFECTIVE-METHOD-BODY.  Is this reasonable ?  What is likely to
  lose ?  [Of course if this wins, there will be free code for all. :-)]

Yes, basically, but you must also provide defgeneric and the method
combination defining macros.
  
  Thanks,
  
    jim