From 523535872830553763
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,db4807a3f0a1e742
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1994-07-27 07:21:23 PST
Path: nntp.gmd.de!Germany.EU.net!EU.net!uunet!nwnexus!korona!pkron
From: pkron@corona.com (Peter Kron)
Organization: Corona Design, Inc., Seattle, WA
Reply-To: pkron@corona.com
Distribution: world
Date: Tue, 26 Jul 1994 19:21:08 PDT
Message-ID: <1994Jul27.022108.252@corona.com>
Newsgroups: comp.std.c++
Subject: Re: Multiple inheritance and delete
References: <CtI5JI.9JE@ucc.su.OZ.AU>
Lines: 42

From: maxtal@physics.su.OZ.AU (John Max Skaller)
>  In article <1994Jul20.044817.698@corona.com>,
>  Peter Kron <pkron@corona.com> wrote:
>>  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.

>  Yes it could but the default is the other way around.
>  Big deal. Its just a default.

The committee is standardizing the language. It's a good
time to consider whether defaults chosen for whatever
historical reasons are achieving intended goals and
consider changing them if they aren't.

>>  I'm suggesting changes that I believe would reduce a lot of
>>  difficulty, based on some recent threads.

>  It would also break REAMS of C++ code, for no good reason
>  other than to change a default to your liking.  Even if
>  your liking is shared by many, that is not enough to zap
>  almost all C++ code in existence.

Would it? It would break code that depends on non-polymorphic
overrides. Non-virtual functions which are not overridden or accessed
only by the overriding classes would still function properly, though
through the virtual mechanism rather than the linker. These cases
probably cover most code. Code that depends on non-polymorphic
overrides is probably destined to break anyway, for the very reasons
I've discussed in proposing the change. Better that those breaks are
detected by the compiler than at run-time.

Function prototypes broke lots of code. They caused a lot of grief to
a lot of people but it was worth it. You have to consider the reams
of code-to-be that will suffer if the default causes problems.
---
NeXTMail:peter.kron@corona.com
Corona Design, Inc.
P.O. Box 51022
Seattle, WA 98115-1022


