Re: On Inheritance...

Johannes N. Johannsen (jojo@well.com)
Wed, 09 Apr 1997 15:39:31 +1200

Park SungWoo wrote:

> ...
> 1)
> In class NewRobot, we want the HANDLER X to be redefined. Hence, as you
> may think, the re-declaration of eventIn X is redundant and unnecessary.
> Then, prototype NewProto would be shown as below.
> What I fear about is that in this case, the prototype NewProto may
> be sometimes confusing. For, at first glance, there is no corresponding
> eventIn declared. Am I right?? or is it just groundless fear ???
>
Let me restate my confusion... it is not related so much to whether you
declare the eventIn X or not. It is related to how do you know whether
what you are declaring overrides a previous declaration vs. accumulates
in the object. In Java/C++, data members accumulate, methods get
overridden. So what confuses me about a declaration like: "eventIn
SFInt32 X" is that it is saying to me -- this is data, it accumulates.
But then it is associated with a HANDLER X, which overrides.

So which is it? The answer seems to be that the "eventIn SFInt32 X" and
the "HANDLER X" both override base class info.

Going by the usual Java cues confused me here, but it was the best I
could do. I understand the conventions now (please let me know if I
don't).

JJ