Article View: comp.std.c++
Article #1709Re: virtual base class construction
From: Bryan Drew
Date: Thu, 10 Aug 1995 13:02
Date: Thu, 10 Aug 1995 13:02
38 lines
2447 bytes
2447 bytes
In reply to article: <407ol9$m03@metro.ucc.su.OZ.AU>
from maxtal@Physics.usyd.edu.au (John Max Skaller):
Are you saying that ALL OO designs should treat the equivalent of virtual
base classes as abstract, or just those designs that are going to be
realised in C++ ??
IMHO there is no reason why a pure OO design should restrict the equivalent
of virtual base classes to be abstract. If the design is then to be
implemented in a language (e.g. C++) whose support for such class hierarchy
designs is limited, then further design is required to work round these
restrictions imposed by the language.
I am not saying that the language is faulty in this instance, just very
restrictive.
The existance of such language restrictions and hence the need for
additional design is painful but not insurmountable, although it will
increase development costs! As such language designers ideally should
review such restrictions to see if the reasons why they were originally
introduced are still valid, with a view to removing such restrictions
whenever possible.
So when you say "Just do it the right way", I assume you mean use an
appropriate work around when implementing in C++. To say that such a
mechanism "is mandatory for a quality OO library class" is too generalistic
and incorrect. C++ is not the only OO language available, and some other
languages may support multiple inheritance in a more coherent manner.
This is clearly an area where the General C++ Design Rule "Don't try to
force people" [D&E of C++ Section 4.2] was compromised to achieve
other requirements.
--
Bryan Drew, Email: bdrew@hi-q.demon.co.uk
Hi-Q Systems Limited, Tel : +44 (0)1252-815035
Hi-Q House, Ancells Court, Fax : +44 (0)1252-815022
Fleet, Hants GU13 8UZ UK
Technical Details
Message-ID:
<172070092wnr@hi-q.demon.co.uk>Path:
arc1-ca.pugleaf.net!hi-q.demon.co.uk!bdrewReferences:
<648258751wnr@hi-q.demon.co.uk> <3up5ne$4gv@fsgm01.fnal.gov> <401gnk$mk0@metro.ucc.su.OZ.AU> <606002587wnr@hi-q.demon.co.uk> <407ol9$m03@metro.ucc.su.OZ.AU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!hi-q.demon.co.uk!bdrew From: Bryan Drew <bdrew@hi-q.demon.co.uk> Newsgroups: comp.std.c++ Subject: Re: virtual base class construction Date: Thu, 10 Aug 1995 13:02:33 GMT Organization: Hi-Q Systems Ltd Message-ID: <172070092wnr@hi-q.demon.co.uk> References: <648258751wnr@hi-q.demon.co.uk> <3up5ne$4gv@fsgm01.fnal.gov> <401gnk$mk0@metro.ucc.su.OZ.AU> <606002587wnr@hi-q.demon.co.uk> <407ol9$m03@metro.ucc.su.OZ.AU> Reply-To: bdrew@hi-q.demon.co.uk X-NNTP-Posting-Host: hi-q.demon.co.uk X-Broken-Date: Thursday, Aug 10, 1995 13.02.33 X-Newsreader: Newswin Alpha 0.7