From -5375778980683730163
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f78e5,ccbfcafab96cf493
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2001-11-29 09:40:02 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
Newsgroups: comp.std.c++
Subject: Re: Proposol to increase robustness of programs
Date: Thu, 29 Nov 2001 17:39:10 GMT
Organization: CMLA, ENS Cachan -- CNRS UMR 8536 (France)
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <flitbterm7.fsf@riz.cmla.ens-cachan.fr>
References: <3BFE97B3.91430FB1@wanadoo.fr> <T23N7.64$%j1.23498@news11-gui.server.ntli.net> <3C058126.36357A00@acm.org>
X-Trace: mail2news.demon.co.uk 1007055555 mail2news:21359 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: text/plain; charset=ISO-8859-1
NNTP-Posting-Date: Thu, 29 Nov 2001 11:36:17 +0000 (UTC)
X-Newsreader: Gnus v5.6.45/Emacs 19.34
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mulga.cs.mu.OZ.AU id EAA27019
Lines: 48
Xref: archiver1.google.com comp.std.c++:8361

Pete Becker <petebecker@acm.org> writes:

| Jim Barry wrote:
| >=20
| > Lo=EFc Joly wrote:
| > > I would like to make a proposal for an addition to the C++
| > > standard. It pertains with virtual function that we want to
| > > be sure exist in the base class.
| >=20
| > The "override" keyword is a fairly popular feature request for C++. I=
t
| > appears relatively easy to implement, easy to teach, breaks no existi=
ng
| > code, and introduces no conflicts with existing language rules. The m=
ain
| > argument against it seems to be that you can get a similar effect by
| > making the virtual function pure in the base class. However, this sto=
ps
| > working at the second level of derivation. Given that there are
| > situations where it is necessary to override a non-pure virtual, it
| > seems useful for there to be a way of ensuring that the override
| > actually overrides something. So I would be in favour of this proposa=
l
| > (though I don't like the "=3D1" idea). Unfortunately, for some reason=
 the
| > "override" keyword doesn't seem to get much support from implementors=
 or
| > committee members.
| >=20
|=20
| The reason that it doesn't get any support from me is that it solves a
| non-problem. If you want to be sure that your member function overrides
| a virtual function in the base, write a test case that calls it through
| the base.

Certainly, it is doable.  But then, the same argument applies for
checking that no object of an abstract class can be created.  Are you
also arguing that that feature solves a non-problem?

--=20
Gabriel Dos Reis, dosreis@cmla.ens-cachan.fr

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]



