From -7261991958097482815
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,db4807a3f0a1e742
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1994-08-04 21:34:48 PST
Newsgroups: comp.std.c++
From: Philip@storcomp.demon.co.uk (Philip Hugh Hunt)
Path: bga.com!news.sprintlink.net!hookup!yeshua.marcam.com!usc!cs.utexas.edu!swrinde!pipex!demon!storcomp.demon.co.uk!Philip
Subject: Re: Multiple inheritance and delete
Distribution: world
References: <CtvC3r.5Kv@ucc.su.OZ.AU> <1994Aug02.045000.2253@corona.com>
Organization: Storage Computers Ltd
Reply-To: Philip@storcomp.demon.co.uk
X-Newsreader: Demon Internet Simple News v1.27
Lines: 36
Date: Thu, 4 Aug 1994 18:14:04 +0000
Message-ID: <776024044snz@storcomp.demon.co.uk>
Sender: usenet@demon.co.uk

In article <1994Aug02.045000.2253@corona.com>
           pkron@corona.com "Peter Kron" writes:
> The language doesn't make any syntactic distinction--it's an
> implementation issue based on the semantics of "virtual". The point
> here is whether non-polymorphic classes really add anything to the
> language--my position being that they create more potential for error    
> than anything else.

Perhaps they do create potential for error if used by programmers who
don't know C++ well. They should either learn the language properly
or stick to Pascal or Visual Basic :-).

If people don't want to use non-polymorphic classes, they don't have to.

"People's ways of thinking and working are so diverse that an attempt to
force a single style would do more harm than good" - Stroustrup.

> 
> Concrete examples to the contrary would be illuminating here.

One example follows:

class Point {
public:
   int x;
   int y;
   Point(int xx =0, int yy =0) { x=xx; y=yy; };
   Point operator+(Point p) {return Point(x+p.x, y+p.y);};
};

If this class was forced to be polymophic, it would be less efficient.
The loss of efficiency would probably be unacceptable if this class was
used in eg a windowing system.

-- 
Phil Hunt


