[Grace-core] Inheritance and Template Objects
James Noble
kjx at ecs.vuw.ac.nz
Fri Apr 5 19:44:01 PDT 2013
> What I'm hoping for is a succinct explanation of the proposal that you have in your head that you are comparing templates to.
Here's my current take on the classical proposal:
Classes define families of objects:
> class C.m(mm) { body }
Classes are instantiated by calling their constructor method as a normal method request
> C.m(mm)
Classes can inherit from other classes by writing constructor calls in the inherits clause.
> class D.n(nn) {
> inherits C.m(nn)
> }
Object constructors can create tailored objects, optionally inheriting from classes.
> object { inherits C.m(mm); body }
and that's it.
cheers
James
More information about the Grace-core
mailing list