3 ms·
Except in Go don't you have to define the set of methods in interfaces? In Matz's system the interfaces would be discovered by the interpreter at run-time.
by blktiger 12y ago
Except in Go don't you have to define the set of methods in interfaces? In Matz's system the interfaces would be discovered by the interpreter at run-time.
- AnimalMuppet 12y agoIf I understand correctly, yes, in Go you have to define the methods that make up the interface.
- jabbrwcky 12y agoIn Go you define the methods in interfaces but implementors do not have to specify that they implement a given interface. Instead any object (though Go has no real objects) is considered to be an implementation of an interface iff it implements all define methods.