4 ms·
I'm interested to see they approach they'll take with Go's interfaces. When Go was first being developed we considered targeting the JVM directly, but there see
by enneff 15y ago
I'm interested to see they approach they'll take with Go's interfaces. When Go was first being developed we considered targeting the JVM directly, but there seemed to be no efficient way of implementing Go-style interfaces, or "structural typing" (I think Scala uses runtime reflection to achieve this, which is slow).
Here's an interesting article on shoe-horning structural typing into the JVM: http://www.draconianoverlord.com/2010/01/17/caller-side-structural-typing.html http://www.draconianoverlord.com/2010/01/17/caller-side-stru...
- beza1e1 15y agoHow is structural typing implemented efficiently?
- enneff 15y agohttp://research.swtch.com/2009/12/go-data-structures-interfaces.html http://research.swtch.com/2009/12/go-data-structures-interfa...
- beza1e1 15y agoThanks for the link. Computing vtables during run time would have been my idea as well. Sorting the vtable is a nice trick to reduce the complexity.