From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f43e6,ea99940253996e3e X-Google-Attributes: gidf43e6,public X-Google-Thread: 109fba,ea99940253996e3e X-Google-Attributes: gid109fba,public X-Google-Thread: 108717,ea99940253996e3e X-Google-Attributes: gid108717,public X-Google-Thread: 103376,ea99940253996e3e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-20 00:41:14 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!newsserver.cilea.it!news.crs4.it!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.software-eng,comp.programming,comp.lang.c++,comp.lang.ada Subject: Re: ISO Studies of underscores vs MixedCase in Ada or C++ Date: Mon, 20 Oct 2003 09:40:53 +0200 Organization: CRS4, Center for Adv. Studies, Research and Development in Sardinia Message-ID: <3F939185.7050809@crs4.it> References: <2cfd1a4e.0309252032.3e3c0a1a@posting.google.com> <266426e1.0309280217.15508f70@posting.google.com> NNTP-Posting-Host: sparre.crs4.it Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: pietro.crs4.it 1066631139 26099 156.148.70.170 (20 Oct 2003 06:25:39 GMT) X-Complaints-To: news@nntpserver.crs4.it. NNTP-Posting-Date: 20 Oct 2003 06:25:39 GMT User-Agent: Any Browser, HTML 4.01, XHTML 1.0 X-Accept-Language: fo, da, no, sv, is, fr, de, it, In-Reply-To: <266426e1.0309280217.15508f70@posting.google.com> Xref: archiver1.google.com comp.software-eng:20829 comp.programming:1218 comp.lang.c++:3134 comp.lang.ada:1180 Date: 2003-10-20T06:25:39+00:00 List-Id: James Dow Allen wrote: > CamelMode, camel_mode, etc. are all quite *readable*; It may be a matter of personal taste (haven't seen any actual studies), but I prefer underscores between words, when I am no allowed to put spaces there. In Ada I follow the style guide and use both underscores and capitalisation. > when using long > names the important thing is to make them *writable*, Try to count how often you _read_ and _write_ an identifier. I think you might be surprised by the difference. Easy writing of the identifers is not anywhere nearly as important as easy reading. > Consistency is therefore the important thing. It is. > If you abbreviate words, > abbreviate them as the first 4 (or whatever) letters, consistently. I prefer the suggestion from the Ada style guide (IIRC) that you don't abbreviate words, and that you only use acronyms from a limited project-specific list. > (I usually rewind a file with "lseek(fd, 0L, 0)" because I can't > remember if 0 is SEEKSET or SEEK_SET.) Very annoying with a standard library with an inconsistent naming of identifiers. One more point on the topic of consistent naming of identifiers. I find the style with using different naming conventions for functions, constants, variables, etc. very annoying. I _don't_ want to have to worry if something is a function, constant or variable. Specially not if it actually is an implementation dependent detail. So _please_ use the same naming convention for all identifiers. Jacob -- "Any, sufficiently complicated, experiment is indistinguishable from magic."