[e-lang] TypeDesc/__getAllegedType replacement notes
Kevin Reid
kpreid at mac.com
Tue Oct 16 21:36:03 EDT 2007
MarkM:
I'm working on trying out the "replace TypeDesc with ObjectExpr
+scope" idea, and here are my notes and problems so far. Please
provide design opinions.
* There is still a kind of object which __getAllegedType returns,
which might or might not also be a guard. I've been calling them
"signature" just to have a word to distinguish them from old TypeDesc
code.
* What is the protocol of a "signature" object? What I have now is {
to getNode()
to getEnvironment()
}
* Nice simplification: The equivalent of e.g. a MessageDesc is just a
"signature" with an EMethod node instead of an ObjectExpr node.
* TypeDesc has a "supers" field, which is used in interface
expressions. What should correspond to this in the new world? My
answer for the moment is that it's an additional field in the
"signature" object. Another possiblity would be using a NKObjectExpr
(nonkernel) which has "extends" in the syntax, but that seems not
quite right since the alleged-type is defined in terms of the kernel.
* Currently, if an object "extends" another, the latter's alleged
messages are included in the former's __getAllegedType answer. How
should this be handled? Following the plan we made suggests that all
the match expressions should be included in the alleged type, but if
"super"s are to be included then including the delegating matcher is
pointless and misleading; but without revealing inside-the-braces
information I see no way to hide the relevant matcher.
--
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang
mailing list