[Grace-core] inheritance for stateless traits and beyond
James Noble
kjx at ecs.vuw.ac.nz
Mon Jun 22 13:47:58 PDT 2015
Hi Kim & all
so on Kernan(1) - with auxiliary definitions below(2) - you get the following results.
If you have a local definition it overrides everything.
Only if you don’t have a local definition,
and you put code between the inherits statements
can you see the change in method binding.
J
> calling e.new
> local method
> local method
> local method
> local method
> calling ea.new
> local method
> local method
> local method
> calling eb.new
> class c's method m
> class d's method m
> done
1. http://ecs.vuw.ac.nz/~mwh/Grace.dmg
2. you have to load the file: cut & paste doesn’t work (and won’t in the immediate future)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mi1.grace
Type: application/octet-stream
Size: 618 bytes
Desc: not available
URL: <http://mailhost.cecs.pdx.edu/pipermail/grace-core/attachments/20150623/0736871b/attachment.obj>
-------------- next part --------------
> On 23/06/2015, at 6:35am, Kim Bruce <kbbruce47 at gmail.com> wrote:
>
>
> class e.new {
> m
> inherits c.new
> m
> inherits d.new
> m
> method m {
> print "local method"
> m
> }
More information about the Grace-core
mailing list