comp.lang.ada
 help / color / mirror / Atom feed
From: Christoph Grein <christoph.grein@eurocopter.de>
To: comp.lang.ada@ada.eu.org
Subject: RE: Ada 0y wish list: "with private"
Date: Thu, 15 Feb 2001 05:53:53 +0100 (MET)
Date: 2001-02-15T05:53:53+01:00	[thread overview]
Message-ID: <mailman.982213394.26957.comp.lang.ada@ada.eu.org> (raw)

   package A is

      type B is private;

   private

   end A;

   package body A is

      type B is ...;

   end A;

There are severe code generation problem with this proposal. When the spec of A 
is compiled, the compiler has to know how big objects of type B are. So the full 
declaration has to go into the spec.

   package A is

      type B is private;

   private

      type X;
      type B is access X;

   end A;

   package body A is

      type X is ...;

   end A;

With this solution, it's definitely clear how big B is, irrespective of the size 
of X;





             reply	other threads:[~2001-02-15  4:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-15  4:53 Christoph Grein [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-02-15 19:16 Ada 0y wish list: "with private" Beard, Frank
2001-02-15  1:04 Beard, Frank
2001-02-15  4:18 ` Jeffrey Carter
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