comp.lang.ada
 help / color / mirror / Atom feed
From: "Beard, Frank" <beardf@spawar.navy.mil>
To: "'comp.lang.ada@ada.eu.org'" <comp.lang.ada@ada.eu.org>
Subject: RE: Ada 0y wish list: "with private"
Date: Wed, 14 Feb 2001 20:04:11 -0500
Date: 2001-02-14T20:04:11-05:00	[thread overview]
Message-ID: <mailman.982199233.21988.comp.lang.ada@ada.eu.org> (raw)

I would love to see this added to the language.  What I have
long wished for is to be able to do the following:

   package A is

      type B is private;

   private

      type B;  -- If the completion is not here,
               -- then it's deferred to the body

   end A;

   package body A is

      type B is ...;

   end A;

This would allow the separation of the spec and body without
the bother of using an access type, and the associated dangling
memory and garbage collection issues.

While Dr. Wrigley indicated that it could be in a separate
file, I'm not sure if what I described above is what he meant
or if he's talking about a separate off of the spec.  But, I
would have not problem with it being required to be in the
package body.

Frank


-----Original Message-----
From: Dr Adrian Wrigley [mailto:amtw@linuxchip.demon.co.uk]

I'd like something a bit similar. "separate" for the private part.
This would allow the private part to be (for example) in a separate
file.  It could have its own context clause, thus obviating the
need for the "with private" extension.

I think the separation of the private part would make it easier
to separate the specification from the implementation properly.
For example, you usually need to edit the specification when
writing the implementation.  Project architects could forbid
this (keep the spec read-only) if the private was separate.





             reply	other threads:[~2001-02-15  1:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-15  1:04 Beard, Frank [this message]
2001-02-15  4:18 ` Ada 0y wish list: "with private" Jeffrey Carter
  -- strict thread matches above, loose matches on Subject: below --
2001-02-15 19:16 Beard, Frank
2001-02-15  4:53 Christoph Grein
2001-02-12 13:41 Thierry Lelegard
2001-02-13  0:10 ` Keith Thompson
2001-02-13  0:13 ` Jeff Creem
2001-02-13  6:37   ` Dale Stanbrough
2001-02-13 12:01     ` Jeff Creem
2001-02-13  8:48 ` Dr Adrian Wrigley
2001-02-13  8:56 ` Michel Gauthier
2001-02-13 16:31 ` Ehud Lamm
replies disabled

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