comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Drummond <brian@shapes.demon.co.uk>
Subject: Re: on the need to duplicate code for procedure signature in both body and interface files
Date: Sun, 8 Jul 2012 17:13:00 +0000 (UTC)
Date: 2012-07-08T17:13:00+00:00	[thread overview]
Message-ID: <jtcf2s$59l$2@dont-email.me> (raw)
In-Reply-To: 527261bb-13d1-4ba7-9e03-1992e54a5532@googlegroups.com

On Sat, 07 Jul 2012 21:01:30 -0700, Shark8 wrote:

> On Saturday, July 7, 2012 5:08:53 PM UTC-6, Nasser M. Abbasi wrote:
>> Basic question from an Ada newbie.
>> 
>> One thing that always bothered me in Ada is the need to physically
>> duplicate the code that represents the API of the package procedures
>> and functions in both the interface and the body files (.ads and .adb).

> My suggestion here is to let the compiler point out your errors. Unlike
> C/C++ an Ada compiler is your friend. There might be an adb -> ads
> generator laying around where you can just feed it an adb file and have
> it spit out the ads-file, but I've never had reason to look for one.

And the best it could do would be a first pass at the ADS-file. Without 
further information it would expose a lot of procedures properly kept 
internal to the implementation (thus the ADB file). You would have to 
delete the rest yourself, or add annotations in the ADB file (heh, how 
about "static" declarations :-)

- Brian

- Brian



  reply	other threads:[~2012-07-08 17:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-07 23:08 on the need to duplicate code for procedure signature in both body and interface files Nasser M. Abbasi
2012-07-08  4:01 ` Shark8
2012-07-08 17:13   ` Brian Drummond [this message]
2012-07-08  4:21 ` Niklas Holsti
2012-07-08  6:09 ` Jeffrey Carter
2012-07-13 15:51   ` Robert A Duff
2012-07-08  7:38 ` Stephen Leake
2012-07-08 10:52 ` Manuel Collado
2012-07-09  1:48 ` Britt
2012-07-09 10:49   ` AdaMagica
2012-07-09 15:11 ` Adam Beneschan
2012-07-13 17:12 ` björn lundin
replies disabled

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