[PRL] IOP and disjoint unions

Richard Cobbe cobbe at ccs.neu.edu
Thu Apr 28 17:22:43 EDT 2005


On Thu, Apr 28, 2005 at 05:19:44PM -0400, Richard Cobbe wrote:
> On Thu, Apr 28, 2005 at 04:46:42PM -0400, William D Clinger wrote:
> > Richard asked:
> > > How does this differ from, for example, Java's instanceof and checked
> > > cast operations?
> > 
> > Java's instanceof and checked cast operations expose the
> > class/interface inheritance hierarchy, reducing representation
> > independence.
> > 
> > The code I wrote is structure-shy: it exposes none of that
> > hierarchy.
> 
> Interesting.  Given that Honu separates subtyping and subclassing, the
> instanceof and cast operations expose only the subtyping hierarchy, not
> the subclassing one.

Actually, let me retract at least part of that.  Honu certainly
separates subclassing and subtyping, but one might be able to argue that
instanceof and casts still expose part of the subclassing hierarchy.
I'll have to think about that a little bit more.

Richard



More information about the PRL mailing list