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=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a02:7122:: with SMTP id n34mr68667835jac.73.1558712983263; Fri, 24 May 2019 08:49:43 -0700 (PDT) X-Received: by 2002:aca:c450:: with SMTP id u77mr6574300oif.119.1558712982954; Fri, 24 May 2019 08:49:42 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!c92no329364itd.0!news-out.google.com!p73ni151itp.0!nntp.google.com!c92no329359itd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 24 May 2019 08:49:42 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=212.45.154.1; posting-account=fEeJQAoAAABLcKAvkveW1ca-ReZJoaMK NNTP-Posting-Host: 212.45.154.1 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <9fd1cb3d-6e81-47bb-afd2-cae1cd3658a1@googlegroups.com> Subject: Suggestions needed to split a package From: "A. Cervetti" Injection-Date: Fri, 24 May 2019 15:49:43 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:56378 Date: 2019-05-24T08:49:42-07:00 List-Id: A package in the program I am writing is getting too long. So I thought it would be a good idea to split it. The package is here: https://github.com/andreacervetti/ada-virt-monitor/tree/master/avm/src/monitor (files monitor-structures.ad*). My problems are: I'd like to avoid forcing clients of the package to "with" too many modules. I want keep private types private. Subroutines in the current package see all the private types and operate directly on record fields and build objects using extension aggregates. One of the record types contain a vector of the other. Being private types simply splitting the file and using "limited with" clause would not be possible, because there would be no visibility of the private part. I thought to define the types as abstract in the parent package and then derive non-abstract types in children. Would it be feasible? I don't know how big would be the impact on current code. To further complicate things there is a child module that operates on structure built in the package. Before embarking on a huge job of modifying the current code I need some suggestions. Does it make sense what I am planning or would it be better leave thing as they are? Thanks in advance A. Cervetti