Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!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:21:53 GMT References: <26909@pasteur.Berkeley.EDU> <11194@alice.UUCP> <140877@sun.Eng.Sun.COM> Sender: davidm@cimshop.UUCP Distribution: comp Organization: Consilium Inc., Mountain View, California. Lines: 21 In-reply-to: chased@rbbb.Eng.Sun.COM's message of 17 Aug 90 19:22:11 GMT In article <140877@sun.Eng.Sun.COM> chased@rbbb.Eng.Sun.COM (David Chase) writes: Speaking not as a C++ expert (because I'm not) but as someone who might care about what an optimizing compiler could infer from "const", I think that #pragma's should be used to give the compiler hints to enable optimization, and that "const" (and its ilk) should be used in whatever sense is most helpful to programmers and program maintainers. I agree with this sentiment, but think the thrust should be reversed (in general). That is, I think #pragma's should be used to give the compiler hints that standard optimization will not work with the current program. The language itself (since it derives from C) should promote optimization in its structure, not as a by-product of implementation specifics (as in the #pragma's). -- ==================================================================== 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!"