Re: "All public methods should be virtual" - yes or no / pros & cons
From: Martin Maat [EBL] (dummy_at_somewhere.nl)
Date: 01/31/04
- Next message: Andreas Huber: "Re: "All public methods should be virtual" - yes or no / pros & cons"
- Next in thread: Andreas Huber: "Re: "All public methods should be virtual" - yes or no / pros & cons"
- Maybe reply: Andreas Huber: "Re: "All public methods should be virtual" - yes or no / pros & cons"
- Maybe reply: Bret Pehrson: "Re: "All public methods should be virtual" - yes or no / pros & cons"
- Maybe reply: Hendrik Schober: "Re: "All public methods should be virtual" - yes or no / pros & cons"
- Maybe reply: Hendrik Schober: "Re: "All public methods should be virtual" - yes or no / pros & cons"
- Maybe reply: Hendrik Schober: "Re: "All public methods should be virtual" - yes or no / pros & cons"
- Maybe reply: Hendrik Schober: "Re: "All public methods should be virtual" - yes or no / pros & cons"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 31 Jan 2004 23:01:24 +0100
"Bret Pehrson" <bret@infowest.com> wrote in message
news:401C0D32.33A421ED@infowest.com...
> > The behavior of the class is changed by sub-classing it. What is the
point
> > of stating that a base class is not changed by the descendant? The way
we
> > look at it there is no point in creating a descendent class if not
either
> > behavior or data members are changed./ extended.
> I agree that overriding to change behavior is half of the story. The
other
> half overriding to create/monitor/track an object's methods. I tried
giving an
> example of such a case before, just to point out that you can't limit
'virtual'
> discussions just to the modification of behavior since it is perfectly
> legitimate to override a method and *not* change any behavior.
Okay, I understand your point now. You are saying it is not a crime to use
polymorphism as an event mechanism. For debugging purposes as in your
example I do not see any harm either. As a design pattern though I say it
should not be done if a more dedicated events mechanism is available in the
particular development environment.
That summarizes most of the noise we all generated on the subject. :-)
Martin.
- Next message: Andreas Huber: "Re: "All public methods should be virtual" - yes or no / pros & cons"
- Next in thread: Andreas Huber: "Re: "All public methods should be virtual" - yes or no / pros & cons"
- Maybe reply: Andreas Huber: "Re: "All public methods should be virtual" - yes or no / pros & cons"
- Maybe reply: Bret Pehrson: "Re: "All public methods should be virtual" - yes or no / pros & cons"
- Maybe reply: Hendrik Schober: "Re: "All public methods should be virtual" - yes or no / pros & cons"
- Maybe reply: Hendrik Schober: "Re: "All public methods should be virtual" - yes or no / pros & cons"
- Maybe reply: Hendrik Schober: "Re: "All public methods should be virtual" - yes or no / pros & cons"
- Maybe reply: Hendrik Schober: "Re: "All public methods should be virtual" - yes or no / pros & cons"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|