[Grace-core] [A Graceful Blog] Comment: "From Lancaster to Portland"

Andrew P. Black black at cs.pdx.edu
Mon Nov 7 06:45:32 PST 2011


This is an old thread and I'm no longer sure of the point that I was trying to make.

On 7 Nov 2011, at 5:51, Eric Tanter wrote:

> I'm sorry but I don't see what you're pointing at:
> 
> class A {}
> class AB extends A { AB get() {return this;} }
> class AC extends A { AC get() {return this;} }
> A a1 = new AB().get();
> A a2 = new AC().get();
> 
> I probably misunderstood what you wrote but that's the closest I could get...
> 
> -- Éric

In Java, I believe that the only common supertype of AB and AC is A, which has no get method at all.

As I understand it, in Grace, the meet of the types equivalent to AC and AB will be the type

	AC meet AB = type µ t{get -> t}

that is, the type t with a get method which answers a value of that very type t.

In other words, meets and joins always exist, and are the "closest fitting" types.

	Andrew

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailhost.cecs.pdx.edu/mailman/private/grace-core/attachments/20111107/bb4c43b9/attachment.html>


More information about the Grace-core mailing list