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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.szaf.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Project files ads/adb organization Date: Thu, 15 Dec 2016 22:31:40 +0200 Organization: Tidorum Ltd Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net IOuzch/ZGZHAuikyHL8u/QO1LCyijhc7FRyq7/Bhd+vDmLMNte Cancel-Lock: sha1:nJbLMTg+iudrCQHppG+xROjOaME= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:32855 Date: 2016-12-15T22:31:40+02:00 List-Id: On 16-12-15 16:40 , Alejandro R. Mosteo wrote: > I'm overthinking how to organize a library source and have come to this > idea (Gnat-specific due to ads/adb files): > > - An /spec/ folder with ads files exposing the client interface. > - An /priv/ folder with ads files for support packages, not intended for > direct client use. > - A /body/ folder for all the bodies. > > A variant could be to separate public spec from bodies, but keep private > parts together. > > I wonder if the idea of separating specs from their bodies could be seen > as a poor choice. Certainly it requires developers to use an Ada-aware > editor like GPS, but for clients seems appropriate not to mix things > they don't need to see. > > Opinions? Or "whatever floats your boat?" I don't see any benefit in separating declarations from bodies "on principle". For me to do that, there would have to be some other reason for such a separation. I tend to put all sources (.ads and .adb) in one and the same folder, to be able to "grep" and use other command-line tools easily. I use folders for the following purposes: - separating more or less independent source-code sets, for example different programs (executables) which share some code (common folder), but also have some program-specific code (program-specific folders) - separating different versions of packages, for example a package with a portable, standard declaration in one folder, but specific bodies for Linux and Windows, in separate "linux" and "windows" folders, with different GPR files or build scripts to select the versions for a particular build. Some of my colleagues like to divide application source code into folders according to the functional divions of the application, for emxaple a "user interface" folder, a "database interface" folder, a "computations" folder, and so on. I prefer not to do that, but to rely on the package hierarchy or other package-and-file naming conventions to group files according to function. So whatever floats... -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .