Re:Half a decade with Go
by dllthomas on Tuesday November 11, 2014 @06:16PM
(#8592956)
It goes down as method names contain more entropy, too.
[ Parent
| on HN ]
Re:Half a decade with Go
by AnimalMuppet on Tuesday November 11, 2014 @06:51PM
(#8593093)
True. And yet... for a good method name in an interface, you want it to be as general as the interface could be. You want sort(), not sortVector(), because sorting is much more general than sorting a vector - you could sort a tree, if it can be ordered.
You could include the name of the interface as part of the method name, though. But the downside of that approach is, if another interface wants to re-use the same method, things get awkward...