3 ms·
Consider carefully that Rob Pike is co-author of a well-known programming language which doesn't really have inheritance, but in which composition is trivially
by btilly 14y ago
Consider carefully that Rob Pike is co-author of a well-known programming language which doesn't really have inheritance, but in which composition is trivially easy.
I think that he may know more about this particular topic than you do.
- seanmcdirmid 14y agoNot only that. Rob Pike is one the original Unix guys, he is also the principal of Plan9/Inferno, and its own language Alef/Limbo. But appeals to authority are very shallow arguments. He should still be able to out debate someone who doesn't know who he is.
- btilly 14y agoAgreed. If Rob Pike were in this discussion, he would be able to do so. Heck, I could debate the merits as well. However sometimes it does make sense to appeal to authority, if only to let someone know how far out of their depth they are.
- abraininavat 14y agoNo, it doesn't. You show someone he's out of his depth by attacking his argument, not by pointing out that the counter-argument comes from someone famous. Are you seriously claiming that no one you've never heard of can possibly argue against a point made by someone you've heard of? That's a sheepish mindset.
- btilly 14y agoI actually did address the point as well. The fact that Rob Pike wrote a usable language that is not OOP in the sense that the commenter thinks of OOP, in which you have composition without inheritance is direct evidence against the commenter's point of view that to do composition you need to be doing OOP.
- pfortuny 14y agoWhat you think about someone and who Pike is I am sorry to say are irrelevant to any argument, as you probably know. Sorry could not help saying it.
- comex 14y agoTo be fair, anonymous fields in Go are essentially inheritance in disguise.
- btilly 14y agoI would disagree. If you call a method that you have because of an anonymous field, and within that method you make a second method call, the second method call gets the method for the anonymous field's type, and not your type. Thus you can't override it. This is very different from how inheritance works in Smalltalk, Java, Python, Ruby, Perl, etc, etc, etc. In C++ terms their methods are all virtual, hence subclasses can override them. And such overriding is a central part of standard OO designs. Go's methods are not virtual.
- pcwalton 14y agoInheritance does not imply virtual methods. They are two different features. Even as early as Simula 67, virtual methods were not the default and had to be explicitly annotated.