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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10ad19,23963231b5359f74 X-Google-Attributes: gid10ad19,public X-Google-Thread: 101deb,23963231b5359f74 X-Google-Attributes: gid101deb,public X-Google-Thread: 103376,23963231b5359f74 X-Google-Attributes: gid103376,public X-Google-Thread: 1073c2,23963231b5359f74 X-Google-Attributes: gid1073c2,public X-Google-Thread: 107a89,23963231b5359f74 X-Google-Attributes: gid107a89,public X-Google-Thread: 11440e,23963231b5359f74 X-Google-Attributes: gid11440e,public X-Google-Thread: 10a146,23963231b5359f74 X-Google-Attributes: gid10a146,public X-Google-ArrivalTime: 2001-06-05 07:35:05 PST Path: archiver1.google.com!news2.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!newsfeed.icl.net!newsfeed00.sul.t-online.de!t-online.de!newsfeed.r-kom.de!feeder01.news.de.uu.net!news-1.bank.dresdner.net!not-for-mail From: James Kanze Newsgroups: comp.lang.ruby,comp.lang.ada,comp.lang.awk,comp.lang.clarion,comp.lang.java.programmer,comp.lang.pl1,comp.lang.vrml Subject: Re: Long names are doom ? Date: Tue, 05 Jun 2001 16:23:56 +0200 Organization: Dresdner Bank AG Message-ID: <3B1CEB7C.76A64930@dresdner-bank.com> References: <3B0DBD4A.82943473@my-deja.net> <3B0DD011.88FCD00E@acm.org> <83WP6.3874$yc6.728572@news.xtra.co.nz> <3B1411D0.3AAF42E7@ftw.rsc.raytheon.com> <9f2nks$ibd$0@dosa.alt.net> <3B177EF7.2A2470F4@facilnet.es> Reply-To: default@dresdner-bank.com NNTP-Posting-Host: ffzj09tz.bank.dresdner.net Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mozilla 4.7 [en]C-CCK-MCD drebazen10 (WinNT; I) X-Accept-Language: en,fr,de Xref: archiver1.google.com comp.lang.ruby:10389 comp.lang.ada:8159 comp.lang.awk:2768 comp.lang.clarion:21105 comp.lang.java.programmer:73694 comp.lang.pl1:763 comp.lang.vrml:3495 Date: 2001-06-05T16:23:56+02:00 List-Id: "Rev. Bob 'Bob' Crispen" wrote: > The kindly Rev. overheard Alvaro Segura saying > on 01 Jun 2001: > >Anyway I do like some consistency like capitalized class names and > >lowercase variable names, but not adding letters (my pet is a Dog, > >not a CDog or a TDog or a Dog_t). > Ages and ages ago, I suggested to the editors of Ada Quality and > Style (as part of the public comment process) that they use the > following convention: > type Dogs is (German_Shepherd, Sheep_Dog, Dog_Pound_Dog); > Dog : Dogs; > That is, plural for type names, singular for object names. You'd be > surprised how often that works out. The editors even adopted it as > their recommendation in an early edition of AQ&S. The plurial doesn't always work. A type States would suggest that it held several states, not just one. A more general rule is to use unqualified nouns as typenames, qualified nouns as variables. So you get: State currentState ; State previousState ; Of course, what is qualified and what isn't depends on context. HardwareState could be a type or a variable, according to whether you consider the Hardware as a qualifier (which it is, grammatically), or something fundamental to the type (as is often the case in programs). -- James Kanze mailto:kanze@gabi-soft.de Conseils en informatique orient�e objet/ Beratung in objektorientierter Datenverarbeitung Ziegelh�ttenweg 17a, 60598 Frankfurt, Germany Tel. +49(069)63198627