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!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder02.blueworldhosting.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: GNAT GPL is proving...educational References: Date: Thu, 01 Aug 2013 11:07:58 -0400 Message-ID: <8538qtfnzl.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt) Cancel-Lock: sha1:on+FA0IDt9sO4EJP0tHE85IjALU= MIME-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: eddf951fa79d7eef2f13012736 X-Received-Bytes: 2358 Xref: news.eternal-september.org comp.lang.ada:16637 Date: 2013-08-01T11:07:58-04:00 List-Id: Alan Jump writes: > On Sunday, July 21, 2013 8:26:10 PM UTC-7, Jeffrey Carter wrote: > >> Stacks.Vector is a child package; its parent is package Stacks. Package Stacks >> must exist to have child packages. > > Tried it. Didn't work. GNAT responded "stacks.vector.ads language > unknown". Try again, more carefully. The file name should be "stacks-vector.ads". Slow down, read the manual, be careful. Ada does work, GNAT does work; there are millions of lines of code out there proving it. > I don't mind this at all. Especially with the option to generate body > stubs from spec files. It works to make sure the body I write meets > the spec I write. I wish Java had been that strict when I was learning > that language; it would have saved me many hours of debugging, not to > mention avoiding more than a few platefuls of spaghetti code. All I'm > pointing out here is that it's forcing a shift in thinking about how I > draft both specs and bodies, and that's a Very Good Thing(tm). Except that you seem to have missed that it does support parent and child packages, which is a very important feature. >> GNAT also requires one compilation unit per source file, but this again is not >> something defined by the language, and many compilers will accept files >> containing multiple compilation units. Many experienced Ada software engineers >> find having a single compilation unit per file a good idea. > > Here's another neophyte question, then...are specs and bodies > considered separate compilation units? Yes. -- -- Stephe