From -2332856960353795310
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,c9300cc6a0b28243
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2003-08-12 21:17:41 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: deutronium@gmx.net ("cody")
Newsgroups: comp.std.c++
Subject: Re: no_base_call
Date: Wed, 13 Aug 2003 04:17:38 +0000 (UTC)
Lines: 41
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <bhcchl$10fcbp$1@ID-176797.news.uni-berlin.de>
References: <_azXa.385380$jp.11007710@twister.southeast.rr.com> <GtNYa.6$0q2.5739@news.ecrc.de> <XG4_a.9517$mB5.669759@twister.southeast.rr.com>
X-Trace: mail2news.demon.co.uk 1060748258 7981 10.0.0.1 (13 Aug 2003 04:17:38 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Wed, 13 Aug 2003 04:17:38 +0000 (UTC)
X-Received: from mulga.cs.mu.oz.au ([128.250.1.22])
	by news.demon.co.uk with esmtp (Exim 4.12)
	id 19mn4q-00024a-00
	for mail2news@news.news.demon.net; Wed, 13 Aug 2003 04:17:37 +0000
X-Received: by mulga.cs.mu.OZ.AU
	id OAA10095; Wed, 13 Aug 2003 14:17:32 +1000 (EST)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Path: comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Delivered-To: std-c++@ucar.edu
X-Newsgroups: comp.std.c++
X-Orig-NNTP-Posting-Host: p50909107.dip.t-dialin.net (80.144.145.7)
X-Orig-X-Trace: news.uni-berlin.de 1060746614 34058617 80.144.145.7 (16 [176797])
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-Spam-Status: No, hits=-5.4 required=5.0
	tests=BAYES_01,PRIORITY_NO_NAME,QUOTED_EMAIL_TEXT,REFERENCES
	version=2.55
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
Xref: archiver1.google.com comp.std.c++:20597

> This is true, which was the point of my original post.  I was trying to
> propose a way that would indicate the intent of the virtual function.
>
> I was saying that if the virtual function was designed to be replaced and
> only replaced, there was no clear way to indicate this thus my proposed
> no_base_call language addition.


you can never know what a programmer will do with your virtual function. he
can extend,intercept,replace it or whatever this is his desicion and not
yours.
that is the principle of virtual functions. they are intended that derrived
classes may alter their implementation or extend the old. how could you know
what somebody will do with your class? maybe he just want to extend the
function to increment a counter when the function gets called, maybe he want
to replace the method or whatever. how could you know? there may be hundreds
of derrived classes from yours why should you restrict the versatility of
polyformism in your class?
but the solution to your problem is: a good dokumentation provides the
programmer information to know how the method *should* correctly be
overridden. this isn't just "calling the base-class or not", this is: "in
which case shall the base been called or not, which return value is correct,
what do i have to do with the arguments, in which manner should the method
affect the state of the object/program" and so on.

i recommend you to read the dokumentation to specific virtual methods and
you'll see how many cases there are.

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk


---
[ 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.jamesd.demon.co.uk/csc/faq.html                       ]



