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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c6567772e9f3871d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.138.79 with SMTP id z15mr730794bkt.8.1319015012100; Wed, 19 Oct 2011 02:03:32 -0700 (PDT) Path: l23ni16754bkv.0!nntp.google.com!news1.google.com!news4.google.com!feeder.news-service.com!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: organizing deep source trees with child packages Date: Wed, 19 Oct 2011 11:03:58 +0200 Organization: cbb software GmbH Message-ID: References: <21c9e6bb-f4f7-4a00-bde7-68f2c1a42d01@q13g2000vby.googlegroups.com> <82ty7d1ewz.fsf@stephe-leake.org> <3486b228-abdd-490f-b4ef-9ee6b19f65fa@gy7g2000vbb.googlegroups.com> <7179717a-9837-476c-b564-6599a9c02acd@ff5g2000vbb.googlegroups.com> <1qk4l4n9zsdgm$.1bvxdhoq5cpx5.dlg@40tude.net> <82hb39umkd.fsf@stephe-leake.org> <82botev9j0.fsf@stephe-leake.org> <82ipnlu4to.fsf@stephe-leake.org> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news1.google.com comp.lang.ada:18594 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2011-10-19T11:03:58+02:00 List-Id: On Tue, 18 Oct 2011 21:51:15 -0400, Stephen Leake wrote: > "Dmitry A. Kazakov" writes: > >> On Tue, 18 Oct 2011 07:12:03 -0400, Stephen Leake wrote: >> >>>>> When do file names and package names _need_ to be different? >>>> >>>> Always. >>> >>> Why? Simple assertions don't get us anywhere. >> >> "c:\mess\foo.adb" /= "Foo" > > You seem to be deliberately misrepresenting the question. What was the question so was the answer, the package name is always different from its file name. > No one is > talking about the absolute path as "the file name"; we are only talking > about the part of the path that maps to the Ada package name. > > So far, the choices seem to be: > > package name Foo.Bar.Baz > gnat convention foo-bar-baz.ads > "java" foo/bar/baz.ads > gnatkr f-barbaz.ads > something else fobaba.ads > > Which of these is best, and why? My answer to this question was: I would not care about the convention if the IDE showed me Ada units. Since the IDE, I am using (GPS), shows file names, I would prefer a convention which eliminates as much as possible of the mess introduced by the file system. My guess is that the Java convention would possibly do it better than the GNAT convention. But again, if the IDE showed units in their relationships (parent-child, generic-instance, parent-separate body) rather than files, the problem would disappear. > I vote for the gnat convention, because the mapping is trivial, and > directories are a pain. Yes, they are when the tools are feeble. With proper tools you would not care. >> Generics also adds a layer of indirection instance <-> generic-body. >> It is just impossible to remember which is an instance of what and >> where are instances with particular parameters. > > Why is it necessary to _remember_ that? In order to find it. E.g. let you have the type Loudness and for some reason need a logarithm of its value. You remember that you have already instantiated Ada.Numerics.Elementary_Functions with Loudness as the parameter somewhere, but need to remember the package name in order to "with" it. You probably instantiated Float_IO too, where it was? Now that was just a trivial example for which some naming schema could easily be deployed in order to help with that. I am talking about projects which *do* use generics, of multiple generic parameters, child generic units etc. > What does this have to do with > file names? Each generic instance is located in some file. >>>> The point is, when browsing a project you are not interested in files, >>> >>> Depends on exactly why I'm "browsing". >> >> While programming/reviewing/testing/debugging an Ada program. > > Still not specific enough. What demands do the various activities place > on the browser? Because you cannot see all units of the project at once, not even their names. > That doesn't mean we can't have a technical discussion, to understand > what the issues are, and how to improve both Emacs and GPS to make them > both better. Not really, because to me the starting point for such discussion is the precondition that an *Ada IDE* shall show *Ada* projects, *Ada* units, *Ada* types, not files. It seems that Emacs users disagree with this precondition telling me how exciting it is to find|grep directories. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de