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: 103376,7ae84c67e252c8f8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-24 20:12:07 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr14.news.prodigy.com.POSTED!3bae8248!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Naming conventions References: <3D3F58F4.9050305@hotmail.com> X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 67.112.201.30 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr14.news.prodigy.com 1027566684 ST000 67.112.201.30 (Wed, 24 Jul 2002 23:11:24 EDT) NNTP-Posting-Date: Wed, 24 Jul 2002 23:11:24 EDT Organization: Prodigy Internet http://www.prodigy.com X-UserInfo1: FKPO@MONAJUMB_LY@BCBNWX@RJ_XPDLMN@GZ_GYO^JWTEPIB_NVUAH_[BL[\IRKIANGGJBFNJF_DOLSCENSY^U@FRFUEXR@KFXYDBPWBCDQJA@X_DCBHXR[C@\EOKCJLED_SZ@RMWYXYWE_P@\\GOIW^@SYFFSWHFIXMADO@^[ADPRPETLBJ]RDGENSKQQZN Date: Thu, 25 Jul 2002 03:11:24 GMT Xref: archiver1.google.com comp.lang.ada:27389 Date: 2002-07-25T03:11:24+00:00 List-Id: > Coming from C++, what I used to think of as a class (a type and its > associated methods) is now roughly equivalent to a package. No no! Abjure such incorrect ideas! An Ada "type ... is ..." and its associated ("primitive") methods is indeed a type. A package is at a higher level. It may have no types at all (consider a trigonometry function library), just one type, a couple of highly related types, or even private types for internal use only. Thus a single package might contain a root bitmap type as well as child Monochrome, VGA, Truecolor, etc types. Or it might have both Socket and Server types. > I've been appending '_Type' to the package names, making names like > Vector_Type, but I don't think that is the Right Thing(TM). Definitely not the Right Thing. Try a package named Sound with a type named Clip_Type and procedures Play(X : in Clip_Type) Record(X : out Clip_Type; Time : in Duration); Perhaps you also have a second package named Video with its own Clip_Type, Play, and Record. Then when you use the packages you will have things like Oh_Tannenbaum, Noise_In_The_Night : Sound.Clip_Type; Ghost_Picture : Video.Clip_Type; ... Sound.Play(Oh_Tannenbaum); ... if Motion_Detected then Sound.Record(Noise_In_The_Night, 60.0); Video.Record(Ghost_Picture, 60.0); end if; > and I've seen a little bit of calling the type simply Instance or Object. An instance or object is a single manifestation of a particular type. eg, Apple_Count, Orange_Count, Back_Camera, or Front_Camera in Apple_Count, Orange_Count : Integer; Back_Camera, Front_Camera : Security_Camera_Type; >http://www.informatik.uni-stuttgart.de/ifi/ps/ada-doc/style_guide/cover.html I think that's the "Ada Quality and Style" guide, which is good, and which will not, I think, lead you astray (although I can't seem to connect to the web site at the moment).