comp.lang.ada
 help / color / mirror / Atom feed
From: "Marc A. Criley" <mcq95@earthlink.net>
Subject: Re: Style question: deep inheritance
Date: Wed, 04 Dec 2002 12:41:48 GMT
Date: 2002-12-04T12:41:48+00:00	[thread overview]
Message-ID: <3DEDF893.52674CD6@earthlink.net> (raw)
In-Reply-To: 7GhH9.54$wk5.1@read3.inet.fi

Anders Wirzenius wrote:
> 
> "Marc A. Criley" <mcq95@earthlink.net> wrote in message
> news:3DECAA3A.F3E7BA90@earthlink.net...
> > The technique I've been using lately to good effect is to employ "use"
> > clauses that eliminate all but the "bottom" package.  E.g., for
> > SAM.Entities.Things.Portals, I'd have a "use SAM.Entities.Things;", so
> > then Portals components get referenced as "Portals.Teleport", for
> > instance.
> >
> > This doesn't help with long filenames, but you can use gnatkr to aid
> > cutting down the length of names.
> >
> > Marc A. Criley
> > Quadrus Corporation
> > www.quadruscorp.com
> 
> "All but the ""bottom"" package" is an excellent technique! Why have I not
> discovered that myself ;-(
> 
> A small 2 cents comment which, again, is borrowed from another (at least J-P
> Rosen):
> The more natural place for the use clause is in the code right before it is
> needed, not at the beginning of the package as a tail to the with clause.
> like:
> with SAM.Entities.Things;
> ...
> begin
> ...
> code not using SAM.Entities.Things
> ...
> define
>   use SAM.Entities.Things;
> begin
>    Portals.Teleport...
> end;
> ...
> code
> ...
> end;
> 
> Thanks for "allowing" to use your code, Marc.

Glad to be of help, and though I didn't mention it, I too also tend to
localize most use clauses inside the procedures where they're needed,
rather than placing them in the context clause list.

Marc



  reply	other threads:[~2002-12-04 12:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-03 11:44 Style question: deep inheritance David Kristola
2002-12-03 12:55 ` Dale Stanbrough
2002-12-03 12:56 ` Marc A. Criley
2002-12-04  6:56   ` Anders Wirzenius
2002-12-04 12:41     ` Marc A. Criley [this message]
2002-12-06 11:00       ` David Kristola
2002-12-09 15:05         ` Ted Dennison
2002-12-03 14:21 ` Stephen Leake
2002-12-04 19:19 ` Ted Dennison
replies disabled

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