[Grace-core] Multiple inheritance & module inheritance
Michael Homer
mwh at ecs.vuw.ac.nz
Sun Mar 15 18:58:18 PDT 2015
On Mon, Mar 16, 2015 at 2:15 PM, Timothy Jones <tim at ecs.vuw.ac.nz> wrote:
> So 'a.new' is not statically-known, and this inheritance is not valid. All
> methods have to be defined in objects, so the only things that it's possible to
> inherit from are classes defined inside of methods or blocks:
>
> {
> class a.new {}
> class b.new { inherits a.new }
> }
Strictly there is a second valid case, in that it's also
statically-known to do this:
object {
inherits object {
method foo {
object { }
}
}.foo
}
Actual applications of that are non-obvious.
-Michael
More information about the Grace-core
mailing list