Maybe you want to take a look at my Go like interfaces. 
[http://forum.nim-lang.org/t/2422#14994](http://forum.nim-lang.org/t/2422#14994)

The difference between Go like interfaces and Java like interfaces, is that 
object that implement that interface does not need to be a ref object or 
inherit from root in any way. That object can be a plain old data object. The 
vtable pointer is not stored in the object at all, but a pointer that is stored 
in an interface is actually a tuple with the pointer to that object, and the 
pointer to the vtable that implements the interface for that object.

Reply via email to