Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!cimshop!davidm From: cimshop!davidm@uunet.UU.NET (David S. Masterson) Newsgroups: comp.std.c++ Subject: Re: 'const' revisited Message-ID: Date: 20 Aug 90 07:31:20 GMT References: <26909@pasteur.Berkeley.EDU> <56514@microsoft.UUCP> <1990Aug14.224806.21375@brutus.cs.uiuc.edu> <9779@goofy.Apple.COM> Sender: davidm@cimshop.UUCP Distribution: comp Organization: Consilium Inc., Mountain View, California. Lines: 23 In-reply-to: pcg@cs.aber.ac.uk's message of 17 Aug 90 16:07:37 GMT In article pcg@cs.aber.ac.uk (Piercarlo Grandi) writes: Again, we go back to my usual and tired observation; what we wnat to achieve is reuse of interface, proof and implementation, and overloading keywords can only go so far to this end (see how strained is the syntax for the = 0 virtual function case). C++ should provide mechanisms towards this, and mostly implementation oriented. 'const' as such is a statement on the implementation of an object, not on its interface or semantics. I agree that overloading keywords "can only go so far", but the interface of an object is *part* of the implementation of the object. I see no reason why 'const' is not also a statement of the interface to an object (as in constant, public pointer to private data areas). Thus far, I have not seen anything that needs a partial const that couldn't be solved by using a constant, public interface to a private data item. -- ==================================================================== David Masterson Consilium, Inc. uunet!cimshop!davidm Mtn. View, CA 94043 ==================================================================== "If someone thinks they know what I said, then I didn't say it!"