comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com (Ted Dennison)
Subject: Re: Style question: deep inheritance
Date: 4 Dec 2002 11:19:22 -0800
Date: 2002-12-04T19:19:22+00:00	[thread overview]
Message-ID: <4519e058.0212041119.37701571@posting.google.com> (raw)
In-Reply-To: 5463bc76.0212030344.712c30aa@posting.google.com

David95038@aol.com (David Kristola) wrote in message news:<5463bc76.0212030344.712c30aa@posting.google.com>...
> facing some ridiculously long names.  For
...
> to avoid the withing problem).  So, portal
> specific operations can be found in
> SAM.Entities.Things.Portals.  The three (and
> counting) specializations of Portals are only
> referenced once to initialize them and let them
> register themselves into the system.  I could use
> renames to flatten out the majority of references
> (package SAM.Portals renames
> SAM.Entities.Things.Portals;), but you can't
> inherit from a rename, so the actual children are

You do realise that you can use relative naming from within the
hierarchy, don't you? For instance, an object inside of
SAM.Entities.Things.Portals can refer to an object in the spec of
SAM.Entities.Things (or either of the other two parents) without any
package notation at all.

The only time you'd ever have to use the full name is outside of the
SAM hierarchy. In that case, you should *want* to use the full name,
to diferentiate SAM.Entities.Things from any other "Things".

If the names are annoying because they contain unneeded information,
then you shouldn't name things that way. For instance, if it makes no
sense to have any other kinds of "Things" inside of SAM, then "Things"
should be a sibling package of "Entities" rather than a child.



      parent reply	other threads:[~2002-12-04 19:19 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
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 [this message]
replies disabled

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