From: "Anders Wirzenius" <anders.wirzenius@pp.qnet.fi>
Subject: Re: Style question: deep inheritance
Date: Wed, 04 Dec 2002 06:56:03 GMT
Date: 2002-12-04T06:56:03+00:00 [thread overview]
Message-ID: <7GhH9.54$wk5.1@read3.inet.fi> (raw)
In-Reply-To: 3DECAA3A.F3E7BA90@earthlink.net
"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.
Anders
next prev parent reply other threads:[~2002-12-04 6:56 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 [this message]
2002-12-04 12:41 ` Marc A. Criley
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