Re: [racket-users] A new OOP programming construct? [slightly long post]

2017-03-30 Thread Matthias Felleisen
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)

Re: [racket-users] A new OOP programming construct? [slightly long post]

2017-03-30 Thread Philip McGrath
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: >

[racket-users] A new OOP programming construct? [slightly long post]

2017-03-30 Thread Erich Rast
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