From -6444975474555673524
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,db4807a3f0a1e742
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1994-07-21 12:03:38 PST
Newsgroups: comp.std.c++
Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!swrinde!elroy.jpl.nasa.gov!decwrl!borland.com!pete
From: pete@genghis.interbase.borland.com (Pete Becker)
Subject: Re: Multiple inheritance and delete
Message-ID: <CtAyoB.LsJ@borland.com>
Sender: news@borland.com (News Admin)
Organization: Borland International
References: <Ct8xyr.Ivq@borland.com> <1994Jul21.021936.314@corona.com>
Date: Thu, 21 Jul 1994 18:14:34 GMT
Lines: 36

In article <1994Jul21.021936.314@corona.com>,
Peter Kron <pkron@corona.com> wrote:
>From: pete@genghis.interbase.borland.com (Pete Becker)
>>  In article <1994Jul20.044817.698@corona.com>,
>>  Peter Kron <pkron@corona.com> wrote:
>>>Clearly this is not desirable behavior, but is a side effect of trying
>>>to minimize storage for vtables and pointers to them. The concept of
>>>polymorphism should imply that *objects* determine how they respond to
>>>member functions, not callers.
>>  
>>  Clearly, the design decision for this pair of
>>  classes was that they are not polymorphic. That
>>  is not a language flaw, but a deliberate decision on the
>>  part of the designer of these classes. If you want the
>>  call to memberFunction() to be virtual, design your
>>  classes appropriately.
>
>Polymorphism is central to using C++ as an OOPL rather than just as
>a better of C. If polymorphism is not desired, it would be much more
>appropriate to use a different member name rather than overriding
>memberFunction. As I suggested, a keyword could be defined to provide
>non-polymorphic overrides, but that would be the exception rather than
>the rule.
>

	I still don't understand the point. The designer of the base class
decided that it should not be treated polymorphically. This is not a decision
that the language imposed, it is a design decision made for this class. Had
the designer wanted it to be polymorphic, that function could have been made
virtual. 
	The fact that someone tried to inherit from this class and "override"
a function that wasn't intended to be overridden is not a language issue. It 
is a result of inadequate documentation, misunderstanding the language, or not 
paying attention.
	-- Pete



