News for hackers. Stuff that matters.
Re:It is ridiculously easy to refactor Go by mseepgood on Sunday January 27, 2013 @05:25PM (#5125933)
Duck typing: "When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck."

Translated to Go: "When I see a type with methods that satisfy this interface, then it implements this interface."

Re:It is ridiculously easy to refactor Go by MatthewPhillips on Sunday January 27, 2013 @06:09PM (#5126084)
But you still have an explicit interface.
Re:It is ridiculously easy to refactor Go by NateDad on Sunday January 27, 2013 @10:06PM (#5126875)
The interface just defines the methods an object must have to be passed into this function. No types have to "implement" the interface in the traditional sense. Anything that happens to have the same methods as are on the interface may be passed into the method that requires that interface.

Basically, the interface just defines at compile time what Python defines at runtime... except it's a hell of a lot easier to see what methods are required for a Go interface, than it is to see what methods are required for a python function (you basically have to read the entire function and any function that function passes the argument to).

Not that I don't like python, I do.

Re:It is ridiculously easy to refactor Go by _ak on Sunday January 27, 2013 @06:26PM (#5126162)
But an implicit implementation of that interface.
Re:It is ridiculously easy to refactor Go by knome on Sunday January 27, 2013 @10:33PM (#5126973)
The metaphor has an explicit duck.