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

From: John Clements (clements at brinckerhoff.org)
Date: Tue Sep 28 17:03:17 EDT 2004

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2169 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20040928/2fc54f16/attachment.p7s>

Posted on the users mailing list.