comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: Problem Compiling with GNAT
Date: 1999/03/16
Date: 1999-03-16T00:00:00+00:00	[thread overview]
Message-ID: <Pine.BSF.4.05.9903151839350.16685-100000@shell5.ba.best.com> (raw)
In-Reply-To: 7ck8pk$2co$1@remarQ.com

On 16 Mar 1999 fraser@sinopsis.com wrote:
> paene lacrimavi postquam Larry <lhazel@mindspring.com> scribavit:
> 
> >In article <m3sob6broj.fsf@mheaney.ni.net>,
> 
> >> "Class" is a horrible choice for the name of a type.  Why don't you just
> >> name the type "Fire_Mission"?
> 
> >I agree.  I inherited this code, don't understand it yet, and am trying to get
> >as much of it to compile as possible with minimum changes.  Actually,
> >Fire_Mission is the name of one package in which a type Class is defined.
> 
> I remember reading somewhere (might have been an article on adahome,
> can't remember) about a coding, uh, paradigm for want of a better word,
> which created a class hierarchy using child pacakages to define names,
> and having exactly one tagged type per (leaf) child package, which is
> always called 'Object' or 'Class' or 'Instance' or whatever.
> 
> I tried it and didn't like it (and I didn't inhale either).  However,
> what I've found lately is that the idea of defining exactly one tagged
> type in each package seems valuable.  It makes packages small, and
> maintenance easier.  Well, it has so far.  We'll see.

One thing I'm trying, and liking, is the Modula-3/OCaml naming style like
so 

package Lists is 
    type T is ...;          -- Main type is always "T"
    type Iterator_T is ...; -- Subordinate types named "<Something>_T"
...

which is similar to the "Class" style. This goes part of the way to the 
one (tagged) type per package style, but acknowledges that you may want to 
declare some helper types too. I believe I can get used to just about any 
consistent coding style, and this one has the virtue of being terse,
especially when wielded by anti-"use" fanatics :-).

-- Brian





  parent reply	other threads:[~1999-03-16  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-15  0:00 Problem Compiling with GNAT Larry
1999-03-15  0:00 ` Matthew Heaney
1999-03-15  0:00   ` Larry
1999-03-16  0:00     ` fraser
1999-03-16  0:00       ` Jean-Pierre Rosen
1999-03-16  0:00         ` Matthew Heaney
1999-03-19  0:00         ` Fraser Wilson
1999-03-16  0:00       ` Matthew Heaney
1999-03-16  0:00       ` Brian Rogoff [this message]
1999-03-16  0:00 ` Larry
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox