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-Thread: a07f3367d7,25d835bb9a4a003f X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Types, packages & objects : the good old naming conventions question (without religious ware) References: <48e4d22d-b83d-4f1d-8bcc-d1684345c9e8@a31g2000yqn.googlegroups.com> From: Stephen Leake Date: Sat, 31 Oct 2009 08:21:47 -0400 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt) Cancel-Lock: sha1:ozqSsew77iIg3DOYqV2kVPSKZhs= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 266ef4aec2bd6e197caa726213 Xref: g2news2.google.com comp.lang.ada:8920 Date: 2009-10-31T08:21:47-04:00 List-Id: dhenry writes: > I'm working on a "real" project and the convention we have chosen is > to use suffixes _Type, _Array_Type and _Access: > > type Foo_Type is private; > type Foo_Access is access all Foo_Type; I use Foo_Access_Type for this. > type Foo_Array_Type is array (Positive range <>) of Foo_Type; I use Positive_Array_Foo_Type for this last one. > We use simple rules, so that _Access can be either used for an > "access", and "access all" or an access on a 'Class. If we need both > class-wide access and simple access, we can use _Class_Access but it's > not hard-written in our coding standard rules. This may not be > rigorous, but we're fine with it because it's simple (when we decided > about our coding standards, we didn't want to produce dozens of pages > of rules). > > However there are some drawbacks, like how to name a variable which > should be "message type" (an integer identifying the kind of a > message). We can't use Message_Type, so we use Message_Typ (which is > of type Message_Typ_Type). That's not pretty at all. Yes, this case is a problem. I just use Message_Type_Type, and live with it. Apparantly in Dylan, that would be Message_Type for the object, and for the type. I like that better. -- -- Stephe