Google Go: Interfaces, not Inheritance

This item showed up on today's "4 Short Links" by Nat Torkington, on O'Reilly Radar. I was struck by Nat's chosen excerpt:

What matters isn't the ancestor relations between things but what they can do for you. That, of course, is where interfaces come into Go. But they're part of a bigger picture, the true Go philosophy. If C++ and Java are about type hierarchies and the taxonomy of types, Go is about composition.

Setting Go aside for a moment, that first sentence captures one of Python's most useful traits: duck typing. Or, I don't care who your parents are. Can you do this job?

In any case, Rob Pike's post is thoughtful and well written, and its treatment of "programming in the large" makes me want to go play with Go.

command center: Less is exponentially more:


Less is exponentially more


I was asked a few weeks ago, "What was the biggest surprise you encountered rolling out Go?" I knew the answer instantly: Although we expected C++ programmers to see Go as an alternative, instead most Go programmers come from languages like Python and Ruby. Very few come from C++.


Python and Ruby programmers come to Go because they don't have to surrender much expressiveness, but gain performance and get to play with concurrency.