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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,e55245590c829bef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!83.128.0.12.MISMATCH!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Beginners question: Compound types, how-to? Date: Mon, 01 Nov 2010 18:39:29 +0100 Organization: Ada @ Home Message-ID: References: <86wroy58ff.fsf@gareth.avalon.lan> <86pqup5xfy.fsf@gareth.avalon.lan> <86y69d3rec.fsf@gareth.avalon.lan> NNTP-Posting-Host: ROGs2ZsQN9QaLpliT0TrGQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.63 (Win32) Xref: g2news1.google.com comp.lang.ada:15111 Date: 2010-11-01T18:39:29+01:00 List-Id: Le Mon, 01 Nov 2010 18:06:19 +0100, Mart van de Wege = a = =C3=A9crit: >> You could have appended "_Type" to the type declaration giving >> "Character_Type." >> This gives the added advantage of allowing your parameters to be >> highly descriptive, especially if you use named-association when >> calling the parameters. >> > That's another way around it. Nice. Thanks. This is required because there is no dedicated name-space for types in A= da. But this is not the only reason, as you may also use postfix to express = = overall semantic traits. As an example, if you've designed a type Foo = which has Reference Semantic (as opposed to Value Semantic), you may nam= e = it Foo_Access (note: a type may have Reference Semantic even if it is no= t = actually an access type). So that when you see a declaration like = =E2=80=9CMy_Entity : Foo_Access;=E2=80=9D, you immediately see My_Entity= has Reference = Semantic=E2=80=A6 and that may help to understand the source, as you may= = understand a copy of My_Entity to My_Entity_Copy will not have the usual= = effect. Another common convention, is to use the suffix =E2=80=9C_Kind=E2=80=9D = on enumerations. = As an example, you have an enumeration type declared like this : type Chocolate_Tablet_Kind is (Big, Medium, Small); This convention appears as an example in the ASIS library (which you may= = discover later). There are others, while just a few (there must not be too much). I = personally use =E2=80=9C_Class=E2=80=9D and some others also use =E2=80=9C= _Array=E2=80=9D. Similar applies with some project conventions which requires the use of = = =E2=80=9C_Generic=E2=80=9D or =E2=80=9C_G=E2=80=9D for generic packages.= But all of this, is still a debatable subject ;) -- = Si les chats miaulent et font autant de vocalises bizarres, c=E2=80=99es= t pas pour = les chiens.