home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!charon.amdahl.com!amdahl!rtech!sgiblab!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
- From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
- Subject: Re: C++ maintenance
- Message-ID: <9302813.19105@mulga.cs.mu.OZ.AU>
- Sender: news@cs.mu.OZ.AU
- Organization: Computer Science, University of Melbourne, Australia
- References: <C1BnAy.C3F@geovision.gvc.com> <harvey.728009429@regina> <1993Jan26.061132.21461@netcom.com>
- Distribution: na
- Date: Thu, 28 Jan 1993 02:49:43 GMT
- Lines: 27
-
- erc@netcom.com (Eric Smith) writes:
-
- >In article <harvey.728009429@regina> harvey@opl.com (Harvey Reed) writes:
- >>For example, our conventions require:
- >>
- >>m<name> (m)ember data of a class
- >>s<name> (s)tatic data of a class
- >>a<name> (a)ctual parameter to a method
- >
- >Two suggestions:
- >
- >1. To make member names obvious in a member function, prefix each with
- > "this->". E.g., instead of invoking a member function as func()
- > invoke it as this->func() (Because prefixing with 'm' or whatever
- > is a nonstandard convention which has to be learned by everyone
- > who looks at your code, but this->func() has standard C++ meaning
- > and is therefore "obvious" to everyone.)
-
- A good suggestion. You can also prefix static data of a class with
- "classname::", instead of using s<name>, and global variables
- can be prefixed with "::".
-
- --
- Fergus Henderson fjh@munta.cs.mu.OZ.AU
- This .signature virus is a self-referential statement that is true - but
- you will only be able to consistently believe it if you copy it to your own
- .signature file!
-