[Grace-core] Inheritance and Template Objects

Marco Servetto marco.servetto at gmail.com
Fri Apr 5 12:00:48 PDT 2013


I'm not too sure to understand well this template idea, so sorry if
what I'm saying can be out of topic; however:
Is there any need to declare template explicitly?
That is, template objects are representing (in my understanding) the
"datastructure" of the class,
in the implementation they would even be "some representation for" the
abstract syntax tree of an object literal.
What if every object literal is simply jointed with his template
object statically created at compile time?
That is, when one write
def o1=object{....}
...
def o2=object{ use o1.template .... }
o2 is created using the "soul" of o1.

"template objects" are objects the user can not (or may be can in some
dialect?) directly create and  observe; still they can be there, and
can be first class too (with some weird typing issues?)
And, of course, trait operators are simply messages over template objects.

Marco


More information about the Grace-core mailing list