On Fri, Feb 11, 2011 at 11:08 PM, Jonathan S. Shapiro <[email protected]>wrote:

> An instance of an interface consists of a reference to some unknown
> (existential) type Tobj and a set of *member functions* accepting that
> reference as their "this" pointer. A type class does *not* do any type
> hiding, which is why it has methods rather than member functions.
>

Of course, this means that interfaces subsume type classes. If you twist
your head just right, you'll conclude that (a) there is no impediment to
allowing static members in an Interface, (b) an interface consisting
exclusively of static members effectively does not encapsulate any type.

Therefore, if we extend the usual notion of Interface to allow type
parameters in the obvious way, Interfaces subsume type classes.

Hmm. That's actually interesting....
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to