You mean something like this:
#lang racket
(define-syntax (using stx)
(syntax-case stx ()
[(_ object class% method)
#'(begin (field (object (new class%)))
(define/public (method)
(send object method)))]))
(define bar% (class object% (super-new) (define
I also find this problem annoying and would be very interested in a
linguistic solution (or alternatively a reason why I shouldn't be getting
myself into this problem so often).
Recently I've been trying to work this by writing functions like this,
which at least abstract out the boilerplate:
> (
Dear all,
This is something I've been wondering for a long time and at the same
time it's a suggestion for implementation, since I'm not familiar
enough with higher Racket macrology.
Often when I define a class it contains instances of other classes. To
access them as a user of an instance of the
3 matches
Mail list logo