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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10ad19,23963231b5359f74 X-Google-Attributes: gid10ad19,public X-Google-Thread: 101deb,23963231b5359f74 X-Google-Attributes: gid101deb,public X-Google-Thread: 107a89,23963231b5359f74 X-Google-Attributes: gid107a89,public X-Google-Thread: 10a146,23963231b5359f74 X-Google-Attributes: gid10a146,public X-Google-Thread: 103376,23963231b5359f74 X-Google-Attributes: gid103376,public X-Google-Thread: 1073c2,23963231b5359f74 X-Google-Attributes: gid1073c2,public X-Google-Thread: 11440e,23963231b5359f74 X-Google-Attributes: gid11440e,public X-Google-ArrivalTime: 2001-06-01 08:24:36 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.icl.net!isdnet!psinet-france!psiuk-f4!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" 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: Fri, 1 Jun 2001 11:09:30 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9f8b7b$h0e$1@nh.pace.co.uk> 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> NNTP-Posting-Host: 136.170.200.133 X-Trace: nh.pace.co.uk 991408171 17422 136.170.200.133 (1 Jun 2001 15:09:31 GMT) X-Complaints-To: newsmaster@pace.co.uk NNTP-Posting-Date: 1 Jun 2001 15:09:31 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ruby:10314 comp.lang.ada:7978 comp.lang.awk:2678 comp.lang.clarion:20806 comp.lang.java.programmer:72706 comp.lang.pl1:695 comp.lang.vrml:3414 Date: 2001-06-01T15:09:31+00:00 List-Id: Using plurals for type names and singulars for object names can work - but not always. When I've got a variable that counts up how many of something I've got, the name naturally wants to reflect that. (Something like Ripe_Oranges : Integer;) Seeing the plural name under your suggested convention would lead one to think it is a type name - at least on cursory inspection or without context. (Ripe_Oranges := Ripe_Oranges + 1; is not likely to get confused as a type name...) I tend to use "_Type" at the end of type names - but that is a bit long and itself subject to confusion or ludicrous afectations. (Sometimes you want an object called "Message_Type" & then have to go invent some name like "Message_Category" or violate your convention. And of course "Message_Type_Type" for the type name looks awfully silly!) I've never seen a convention that I *really* liked and didn't have problems. Probably like source code formatting (the great "Capital versus Lower Case Debate", anyone?) it is probably best to write one down and then stick to it. Consistency being more important than the exact details of the naming convention. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Rev. Bob 'Bob' Crispen" wrote in message news:Xns90B35A5F54A70revbob@207.126.101.100... > > 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. > > Evidently some CS professor types were aghast at the simplicity of this > proposal, and a later version of AQ&S changed it to something like > "abstract words for type names, specific words for object names" -- > advice that's impossible to understand, much less follow. > > I found this culture clash perfectly understandable: I'd come from an > engineering background, so type names like Amperes and Foot_Pounds came > naturally. And too, I had the requirement to produce large volumes of > maintainable code. CS professors are, in my experience, strangers to > both those things. I'm sure there are some dazzling exceptions to this > observation, but all the ones I've met couldn't even get their arms > around the notion that at the end of the day, the sumbitch had to WORK. > > Nowadays, I'd probably use My_Dog as the object identifier, but the > good old plural as a type name is still a perfectly good convention, > imho. > > Alas, in C and C++ all the really interesting stuff is in the type or > class definitions, and the name you give x in x->foo[i].bar doesn't > make much difference. > -- > Rev. Bob "Bob" Crispen > crispen at hiwaay dot net > > "We can fix this, but you're gonna need a butter knife, a roll of > duct tape, and a car battery."