[plt-scheme] class.ss: super vs this methods

From: Jon Rafkind (workmin at ccs.neu.edu)
Date: Fri Aug 4 21:52:23 EDT 2006

To call a super method in a class from class.ss you can call
(super foo arg1 arg2)

But if you want to call a method using the regular virtual table you
have to do
(send this foo arg1 arg2)

Could (this) be made to work in the same way as (super) if supplied in
the procedure position? Or would it be possible to just call (foo) and
have it resolve to the correct method in the virtual table?

(foo arg1 arg2)

I like (super) and I like (foo), I just don't like (send this foo), and
yes I realize I can do this instead
(with-method ((foo (this foo))
  (foo arg1 arg2))

I just feel thats a lot of machinery for something that could be built in.


Posted on the users mailing list.