[plt-scheme] inner

From: Robby Findler (robby at cs.uchicago.edu)
Date: Mon Sep 27 17:28:12 EDT 2004

At Mon, 27 Sep 2004 17:19:38 -0400, "Mike T. Machenry" wrote:
> Is it not possible to call the inner augmentation of a method from within a 
> another method of the class?

It is possible:

(define c%
  (class object%
    (define/pubment (f) (inner 0 g))
    (define/pubment (g) 1)
    (super-new)))

(define d%
  (class c%
    (define/augment (f) 1)
    (define/augment (g) 2)
    (super-new)))

(send (new c%) f) ;; => 0
(send (new d%) f) ;; => 2
(send (new d%) g) ;; => 1

See the OOPSLA paper for details, if these results aren't clear (unless
you already have, in which case ask away)

Robby



Posted on the users mailing list.