Re: TypeDesc/__getAllegedType replacement notes

"Mark Miller" <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
On Oct 16, 2007 6:36 PM, Kevin Reid <[email protected]> wrote:
> 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()
>   }

Seems good.


> * Nice simplification: The equivalent of e.g. a MessageDesc is just a
> "signature" with an EMethod node instead of an ObjectExpr node.

I like it.


> * 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.

I'm not sure I understand the first option. What would be the value of
a signature's getSuper() (or whatever the name of the new field is)?


> * 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.

 If we come up with a satisfying answer for the previous question --
what's a signature's getSuper()? -- might that take case of this as
well?

For example, when an object is asked __getAllegedType(), it asks its
matcher for their __getAllegedType() as now, and includes the answer
as the getSuper() value of the signature it makes and returns. Does
this make sense?

-- 
Text by me above is hereby placed in the public domain

    Cheers,
    --MarkM
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.