From -1874594367988899153 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f78e5,c9300cc6a0b28243 X-Google-Attributes: gidf78e5,public X-Google-ArrivalTime: 2003-08-12 10:17:47 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: no_spam_remove_up_to_here_jwilliams@mfchelp.com ("Jeff Williams") Newsgroups: comp.std.c++ Subject: Re: no_base_call Date: Tue, 12 Aug 2003 17:17:46 +0000 (UTC) Organization: Road Runner - EC Lines: 51 Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++) Message-ID: References: <_azXa.385380$jp.11007710@twister.southeast.rr.com> X-Trace: mail2news.demon.co.uk 1060708666 5921 10.0.0.1 (12 Aug 2003 17:17:46 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Tue, 12 Aug 2003 17:17:46 +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 19mcmH-0001XM-00 for mail2news@news.news.demon.net; Tue, 12 Aug 2003 17:17:45 +0000 X-Received: from localhost (localhost [[UNIX: localhost]]) by mulga.cs.mu.OZ.AU id DAA08192; Wed, 13 Aug 2003 03:17:40 +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-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-NNTP-Posting-Date: Tue, 12 Aug 2003 08:01:59 EDT X-Spam-Status: No, hits=-3.9 required=5.0 tests=AWL,BAYES_01,PRIORITY_NO_NAME,QUOTED_EMAIL_TEXT,REFERENCES, WEIRD_QUOTING 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++:20577 ""cody"" wrote in message news:GtNYa.6$0q2.5739@news.ecrc.de... > you can't create a virtual function and say what somebody has to do with is. > this is the decision of the programmer. > > there are 3 things which you can do with a vitual function when overriding > it: > > replace it: > virtual void Func() > { > // your code goes here > } > > extend it: > virtual void Func() > { > Base::Func(); // call the base > // your code goes here after the base call > } > > intercept it: > virtual void Func() > { > // your code before the basefunc is called > Base::Func(); // call the base > } > > when you design a class you can never know what a programmer will do with > your virtual functions in its derrived classes. if you would know you > wouldn't need them. > > -- > cody 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. Jeff --- [ 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 ]