Mark S. Miller erights at
Mon Jan 18 12:41:54 PST 2010

On Mon, Jan 18, 2010 at 7:32 AM, P T Withington <ptw at> wrote:

> In the various classes-as-sugar proposals, is there a way to test if one
> class is a subclass of another?  Is it as simple as:
>  classa.prototype instanceof classb
> ?
> In some of them, yes. For the desugaring presented at <>,

    WobblyPoint.prototype instanceof Point

would work for the right reason. In some later proposals, no, because the
concept of subclassing is being replaced by the concept of trait
combination. Since this gives non-tree-like subtype relationships, it can't
accommodate instanceof.

> Should there be a `subclassof` operator?
> _______________________________________________
> es-discuss mailing list
> es-discuss at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list