[Grace-core] Inheritance and Template Objects
James Noble
kjx at ecs.vuw.ac.nz
Fri Apr 5 19:49:47 PDT 2013
On 6/04/2013, at 15:44 PM, James Noble wrote:
> Here's my current take on the classical proposal:
and since I can never resist...
some extensions / complications / options:
1. decree that objects which contain a method which tail-calls an object constructor
are *also classes*
> def C = object {
> method m(mm) {
> return object { body }
> }
> }
is taken as defining a class as if it was written:
> class C.m(mm) { body }
2. support MI or trait algebra in inherits clauses - e.g
> class Foo.m(mm) {
> inherits A.x(a) + B.y(b)
> }
3. explicit Andrew/Java style syntax for calling constructors - instantiate classes only with
> object C.m
James
More information about the Grace-core
mailing list