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: 103376,e55245590c829bef X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Mart van de Wege Newsgroups: comp.lang.ada Subject: Re: Beginners question: Compound types, how-to? Date: Mon, 01 Nov 2010 18:58:25 +0100 Message-ID: <86fwvlaptq.fsf@gareth.avalon.lan> References: <86wroy58ff.fsf@gareth.avalon.lan> <86pqup5xfy.fsf@gareth.avalon.lan> <86y69d3rec.fsf@gareth.avalon.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net eP5U1tC7anhlPyQ9wQdInAO4yyVwstT+NNcFeEHpF+M9ZrgmN0 X-Orig-Path: gareth.avalon.lan!not-for-mail Cancel-Lock: sha1:9Yn3CSYp7vI6AGYXpe+adeQwl+M= sha1:LSCm914JJolMFzGn55gGt/srK0E= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Xref: g2news2.google.com comp.lang.ada:16085 Date: 2010-11-01T18:58:25+01:00 List-Id: "Yannick Duchêne (Hibou57)" writes: > Le Mon, 01 Nov 2010 18:06:19 +0100, Mart van de Wege > a écrit: >>> 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 Ada. > Yes, I've seen that before. Thanks. > Another common convention, is to use the suffix “_Kind” 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 “_Class” and some others also use “_Array”. > Heh. The _Array suffix came rather naturally, as the domain-specific term actually is 'Ability Array'. 'Class' however will clash rather badly, as that is another domain-specific term (hmmm. Class_Class. That would be funny). Mart -- "We will need a longer wall when the revolution comes." --- AJS, quoting an uncertain source.