[plt-scheme] new documentation needed for 'augment'able methods?

From: Robby Findler (robby at cs.uchicago.edu)
Date: Tue Sep 28 17:11:24 EDT 2004

This is certainly a problem in general (both for augmentable and
overridable methods), but in the case of the can-...? methods that are
augmentable, you can feel pretty secure that they look like:

  (and ...some condition... (inner #t can-...?))

In any case, if you have problems now, discovering them should be
easier -- you new method won't work (rather than you are breaking some
old code).


At Tue, 28 Sep 2004 17:03:17 -0400, John Clements wrote:
> ------------------------------------------------------------------------------
> The new class system shifts the balance of power for some class 
> operations to the superclass.  That is, classes can now provide 
> 'pubment' methods which call their augmentations at their whim.  As a 
> subclass-er, however, I find that I'm now lacking some documentation.  
> In particular, suppose I'm providing an 'augment' to a text% method, 
> say 'on-insert'.  But... will my result be used as the result of the 
> whole method?  In other words, does the parent definition return the 
> result of the (inner ...) call?  In the old system, I could cover 
> myself by just calling the 'super' method last whenever I had some 
> stateful behavior to tack on to a method. Now, I'm less certain what 
> the conservative approach is.
> I see that there's a parallel problem with the old system: where do you 
> make the super call?  But it seems to me that the new system may wind 
> up being more tricky.
> In the case of on-insert, that result is (void), so I'm not worried.  
> But in general, it seems to me that this opens up a new can of worms, 
> which is properly addressed only by additional documentation on all 
> 'augment'able methods.
> john
> ------------------------------------------------------------------------------
> [application/#f "smime.p7s"]

Posted on the users mailing list.