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.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP 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: 103376,23963231b5359f74 X-Google-Attributes: gid103376,public X-Google-Thread: 1073c2,23963231b5359f74 X-Google-Attributes: gid1073c2,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 07:23:21 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!sn-xit-01!supernews.com!newshub2.rdc1.sfba.home.com!news.home.com!enews.sgi.com!hammer.uoregon.edu!feed.textport.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ruby,comp.lang.ada,comp.lang.awk,comp.lang.clarion,comp.lang.java.programmer,comp.lang.pl1,comp.lang.vrml From: Ted Dennison 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> Subject: Choosing proper object names (was: Long names are doom ?) Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Fri, 01 Jun 2001 10:22:39 EDT Organization: http://www.newsranger.com Date: Fri, 01 Jun 2001 14:22:39 GMT Xref: archiver1.google.com comp.lang.ruby:10311 comp.lang.ada:7973 comp.lang.awk:2676 comp.lang.clarion:20793 comp.lang.java.programmer:72686 comp.lang.pl1:694 comp.lang.vrml:3413 Date: 2001-06-01T14:22:39+00:00 List-Id: In article , Rev. Bob 'Bob' Crispen says... > 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. That doesn't work too well for quantity nouns (try the same trick with "Sheep"), or for linked structures or arrays. Personally I prefer to name arrays in the singular so they look better when individual elements are accesed (their typical use), but many develpers do not. I know the "general and specific" rule seems vague, but it is in fact the rule I settled on for my Ada code. Funny that I independantly settled on the same rule as all those ivory tower acedemics after a couple of years of experience. :-) I do think it reads better. If you come across the declaration: Thread_List : Singly_Linked_List; ..it tells you a lot more relevent information than: Thread_List : Thread_Lists; Of course there's nothing stopping you from using both rules: Thread_List : Singly_Linked_Lists; But then what's plural here? The type is a singly linked list type, not a group of them (unless you are into recursive logic). The thing that is plural here is the *contents* of the list, so I think you'd really have to name it something more like "Singly_Linked_Nodes", if you want it plural. But we have a name for a bunch of singly linked nodes; its a "singly linked list". Might as well use that name. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com