[Grace-core] Mixins in Grace?
James Noble
kjx at ecs.vuw.ac.nz
Wed Nov 21 20:42:39 PST 2012
Mixins are cool:
like this
method mixin (x) {
return object {
inherits x
//extra bits go here
}}
or this
class Trait.apply (x) {
inherits x
//extra bits go here
}
do we want to support this? Can we do so (easily?) with sufficient "staticness" restrictions on x?
(The method/object constructor version currently works in minigrace, the class version doesn't)
Mixins are one option to support multiple inheritance in practice (e.g. for dialects) without adding (much) complexity / or other features to Grace.
James
More information about the Grace-core
mailing list