Path: utzoo!censor!geac!torsqnt!hybrid!scifi!bywater!uunet!cimshop!davidm From: cimshop!davidm@uunet.UU.NET (David S. Masterson) Newsgroups: comp.lang.c++ Subject: Re: Naming Conventions Message-ID: Date: 11 Jan 91 19:09:08 GMT References: <60352@microsoft.UUCP> <278D1767.505@tct.uucp> Sender: davidm@cimshop.UUCP Organization: Consilium Inc., Mountain View, California Lines: 50 In-reply-to: chip@tct.uucp's message of 11 Jan 91 01:39:51 GMT X-Posting-Software: GNUS 3.12 [ NNTP-based News Reader for GNU Emacs ] >>>>> On 11 Jan 91 01:39:51 GMT, chip@tct.uucp (Chip Salzenberg) said: Chip> According to cimshop!davidm@uunet.UU.NET (David S. Masterson): David> // File - complex.ths David> #ifndef THESAURUS_OFF David> #ifndef COMPLEX_THS David> #define COMPLEX_THS David> David> #define Complex complex David> #define COMPLEX complex David> #define ThisIsComplex complex David> // ... David> David> #endif David> #endif Chip> Aargh! It's hard enough to read a mix of other people's code, without Chip> making one class available under names. But, if you had to maintain a system of a million LOC and were changing libraries somewhere along the line, it would be very nice to change old references to the new style in one fell swoop rather than hunt through the code. One thing I'm allowing for here is the potential that somewhere along the line in the development of C++, vendors are going to begin vending C++ objects that will act as building blocks for code that application developers develop. If the application has a long lifetime, its likely that the libraries that the application depends on will change (not only version changes to one vendor's library, but also changing vendors). Allowing for this may mean coping with different vendors naming strategies. Even with an extremely stringent naming convention, its likely that different vendors will interpret it different ways (can you say 'vendor lock-in'?). Therefore, I'm in favor of adopting a strategy that allows this and yet allows the user to correct the differences if need be. I also think, though, that the thesaurus approach allows users of repositories of objects (many, many libraries) to more easily find candidate objects for reuse in their application. Initially, the thesaurus may be very lean in alternate phrases for an idea, but, as the use of the library grows, the thesaurus can be filled in. Some tool could be developed to even automate this. -- ==================================================================== David Masterson Consilium, Inc. (415) 691-6311 640 Clyde Ct. uunet!cimshop!davidm Mtn. View, CA 94043 ==================================================================== "If someone thinks they know what I said, then I didn't say it!"