Melvin Smith wrote: > > >Methinks (that's me, not you) that if me thinks (that's you, not me) > >that my argument is an argument *for* it being pretty odd *not* to > >inherit them, that there is an assumption by me or me (that's one or the > >other of us) that is clearly wrong about the way inheritance of methods > >(should) work. > > Eek. > > >In my mind, the idea of inheriting a method is that the subclass and the > >superclass have a common subroutine that is invoked whether the message > >is sent to the subclass or to the superclass. In Perl6 terms, that > > I'm not comfortable with this sort of concept. Typically "inheritance" is > going to either take the base implementation or _replace_ the implementation. > The replacement can decide to {call|ignore} the base method.
I think you just said the same thing I did. To be more explicit, using the terminology you seem to want to use, I'll point out that I was only talking about the case of an inherited method, not a _replacement_ method. In other words, when you inherit a method, you are taking the base implementation for that method. But if you replace a method, you are not inheriting that method, but rather replacing it; yes, the replacement method may choose to call the base implementation's method as part of the replacement implementation. When you replace a method, you have 2 subroutines, the base implementation, and the replacement implementation, but when you inherit a method, you have only 1 subroutine, which may be called 2 different ways. > If you have hidden side effects that makes things scary, (and potentially > costly in the long run) I think. I wasn't positing hidden side effects. I was trying to not inherit fragments of the base implementation, as me seemed to be trying to do. > If you wouldn't want the base implementation to be ignore there is usually > some mechanism in C++ and Java for this, how it applies to Perl6 I'm not > sure. I'm not sure either. In fact, I'm not sure what you mean by this sentence at all. If it matters, please rephrase it, so we can talk more about it. > -Melvin -- Glenn ===== Due to the current economic situation, the light at the end of the tunnel will be turned off until further notice.