From 7231120708432042963
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,ccbfcafab96cf493
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2001-12-07 09:46: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: Pete Becker <petebecker@acm.org>
Newsgroups: comp.std.c++
Subject: Re: Proposol to increase robustness of programs
Date: Fri,  7 Dec 2001 17:45:38 GMT
Organization: Dinkumware, Ltd
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <3C10CE1E.E556E183@acm.org>
References: <3BFE97B3.91430FB1@wanadoo.fr> <T23N7.64$%j1.23498@news11-gui.server.ntli.net> <3C058126.36357A00@acm.org> <EKwN7.1910$V51.448065@news11-gui.server.ntli.net> <3C06A0CE.E91638E8@acm.org> <Tb5O7.940$003.235141@news11-gui.server.ntli.net> <3C0C1E25.1A0247AD@acm.org> <3C0D410B.7198B21D@wanadoo.fr> <3C0D4878.A86E882E@acm.org> <7dc3b1ea.0112060840.69c166cc@posting.google.com> <3C0FD9D7.8F1845C4@acm.org> <3C102097.B3C1FEA8@wizard.net>
X-Trace: mail2news.demon.co.uk 1007747148 mail2news:5716 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
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Date: 7 Dec 2001 14:11:12 GMT
X-Accept-Language:  en
Lines: 51
Xref: archiver1.google.com comp.std.c++:8549

"James Kuyper Jr." wrote:
> 
> Pete Becker wrote:
> >
> > Peter Dimov wrote:
> > >
> > > After changing a base virtual function signature, the typical
> > > procedure is to locate all overriders - by hand - and fix them. Rarely
> > > does a programmer wait for the tests to fail. They will. No new
> > > information would be gained.
> > >
> > > With consistent use of 'override', the process is automated.
> > >
> >
> > No, it turns into compile-and-see-what-breaks, which is rarely a good
> > approach to software engineering.
> 
> I'm sorry, but I have to disagree. Compile-and-see-what-breaks is one of
> the many important tools that belongs in every programmer's tool chest.

No. When programmers resort to this it's because they're tired of
thinking.

> I think you're missing out on one of the most basic problems 'override'
> helps with: spelling errors. Without 'override', a misspelled overrider
> is a perfectly legal definition of a completely different member
> function. If you are consistently misreading it as having been correctly
> spelled (a mistake that's easy for human beings to make), it can be very
> difficult to detect the problem through testing, or debugging.

Huh? If you haven't overridden a base-class virtual function, then your
test code that exercises the derived-class overrider will fail. That's
not at all hard: it just works.

> Compilers, on the other hand, excel at detecting that kind of error.
> Maybe you spell perfectly, but I don't, and neither do most of the other
> programmers I've ever worked with.

There are lots of places where this could happen. Changing the language
to attack one that's easy to test for isn't particularly useful.

-- 
Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)

---
[ 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                ]



