comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: GNAT GPL is proving...educational
Date: Thu, 01 Aug 2013 11:07:58 -0400
Date: 2013-08-01T11:07:58-04:00	[thread overview]
Message-ID: <8538qtfnzl.fsf@stephe-leake.org> (raw)
In-Reply-To: be5b1878-f8f0-4448-adeb-9613f4c61b97@googlegroups.com

Alan Jump <alan.jump@gmail.com> 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

  parent reply	other threads:[~2013-08-01 15:07 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-22  1:28 GNAT GPL is proving...educational Alan Jump
2013-07-22  3:26 ` Jeffrey Carter
2013-07-22  3:50   ` Alan Jump
2013-07-22  5:11     ` Jeffrey Carter
2013-07-22 22:19       ` Shark8
2013-07-22  5:28     ` Bill Findlay
2013-07-22  8:49       ` Georg Bauhaus
2013-07-22  9:04         ` Bill Findlay
2013-08-01 15:07     ` Stephen Leake [this message]
2013-08-01 19:28       ` Alan Jump
2013-07-25  5:41   ` Yannick Duchêne (Hibou57)
2013-07-25 20:25     ` J-P. Rosen
2013-07-25 23:07       ` Yannick Duchêne (Hibou57)
2013-07-22  7:18 ` Niklas Holsti
2013-07-22  8:52   ` Simon Wright
2013-07-31  2:02   ` David Thompson
2013-07-22 18:28 ` Yannick Duchêne (Hibou57)
2013-07-22 19:04   ` Alan Jump
2013-07-22 19:49     ` Ludovic Brenta
2013-07-22 19:51     ` Simon Wright
2013-07-22 20:12     ` Jeffrey Carter
2013-07-22 23:34     ` Adam Beneschan
2013-07-23  3:46       ` Shark8
2013-07-23 17:46         ` Yannick Duchêne (Hibou57)
2013-07-27  3:17       ` Randy Brukardt
2013-07-29 17:21         ` Alan Jump
2013-07-29 20:57           ` Shark8
2013-07-29 21:30             ` Adam Beneschan
2013-07-29 21:44               ` Alan Jump
2013-07-29 22:36                 ` Yannick Duchêne (Hibou57)
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox