Danny Yoo <firstname.lastname@example.org>
I want to be able to mixin languages together.
Let’s say that I want to take any language, treat it as a parent, and then add my custom #%app binding to it.
It’s possible to do this by hand, but I want to make it stupid-easy. I would love to be able to say:
#lang planet dyoo/mixin-lang/apply
#lang planet dyoo/mixin-lang/mixin
(define-syntax-rule (#%app operator operands ...)
(let ([op-v operator])
(begin (printf "Application with ~s" (object-name op-v))
(#%parent-#%app op-v operands ...))))
The application of the mixin should generate the necessary module code that combines racket with "trace-mixin.rkt". The end result should be a new module language that, for the most part, is racket, except for the overridden #%app binding. The mixin module should be able to use the parent bindings, because they should all be prefixed with #%parent-....