From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4cd85c8656c704b6,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-03 03:44:20 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: David95038@aol.com (David Kristola) Newsgroups: comp.lang.ada Subject: Style question: deep inheritance Date: 3 Dec 2002 03:44:20 -0800 Organization: http://groups.google.com/ Message-ID: <5463bc76.0212030344.712c30aa@posting.google.com> NNTP-Posting-Host: 63.194.212.92 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1038915860 5362 127.0.0.1 (3 Dec 2002 11:44:20 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 3 Dec 2002 11:44:20 GMT Xref: archiver1.google.com comp.lang.ada:31372 Date: 2002-12-03T11:44:20+00:00 List-Id: 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