comp.lang.ada
 help / color / mirror / Atom feed
* Style question: deep inheritance
@ 2002-12-03 11:44 David Kristola
  2002-12-03 12:55 ` Dale Stanbrough
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: David Kristola @ 2002-12-03 11:44 UTC (permalink / raw)


I am working on a MUD in Ada.  Inheritance lends
itself well to the problem domain, but after a few
levels of child types in child packages, i am
facing some ridiculously long names.  For
instance, portals are used to move from place to
place.  But they are a specialization of inanimate
objects (things), which are a specialization of
general things (entities), which are a
specialization of the parent class (which is used
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
still deeply nested.  The long package names
usually mean long file names.  This could become a
portability problem.

I'm interested in how other people have dealt with
this problem, or suggestions for how i might deal
with it.

Thanks,
--djk



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-12-09 15:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox