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: 10ad19,23963231b5359f74 X-Google-Attributes: gid10ad19,public X-Google-Thread: 107a89,23963231b5359f74 X-Google-Attributes: gid107a89,public X-Google-Thread: 103376,23963231b5359f74 X-Google-Attributes: gid103376,public X-Google-Thread: 1073c2,23963231b5359f74 X-Google-Attributes: gid1073c2,public X-Google-Thread: 101deb,23963231b5359f74 X-Google-Attributes: gid101deb,public X-Google-Thread: 10a146,23963231b5359f74 X-Google-Attributes: gid10a146,public X-Google-Thread: 11440e,23963231b5359f74 X-Google-Attributes: gid11440e,public X-Google-ArrivalTime: 2001-06-01 06:50:22 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: revbob@the.rectory (Rev. Bob 'Bob' Crispen) 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, 01 Jun 2001 13:50:22 -0000 Organization: http://home.hiwaay.net/~crispen/ Message-ID: 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> User-Agent: Xnews/M3 X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ruby:10307 comp.lang.ada:7969 comp.lang.awk:2674 comp.lang.clarion:20789 comp.lang.java.programmer:72672 comp.lang.pl1:692 comp.lang.vrml:3411 Date: 2001-06-01T13:50:22+00:00 List-Id: 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. 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."