Go Interfaces

Ian Lance Taylor, one of the authors of Go, just posted two articles: Go Interfaces and Go Interface Values.

I consider these part of the hopefully upcoming "Go for Smalltalk Programmers". ;)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Another post

1) Open Multimethods? 2) Nominal vs. Structural Subtyping

First, without inheritance, I'm wondering if Go could support an open multimethod programming model with some reasonable method resolution logic.

Second, am I dreaming, or does Go opt for nominal typing when it comes to interfaces and datatype methods (via the type name?), but then "revert" to structural subtyping when it comes to parameter passing?

Yes, an interface name might be attached to a parameter, but IIRC, this name bears no programmatic relationship to the datatype that implements the methods that satisfy this interface - yes?

And (thinking loosely of the let/lambda equivalence) how do other forms of binding fit into this scheme: variable binding, assignment, etc.???

Thanks,

Scott