comp.lang.ada
 help / color / mirror / Atom feed
From: Ed Falis <efalis@mediaone.net>
Subject: Re: About private types and reusability?
Date: Fri, 13 Jul 2001 23:06:55 GMT
Date: 2001-07-13T23:06:55+00:00	[thread overview]
Message-ID: <3B4F7F3A.957924C4@mediaone.net> (raw)
In-Reply-To: Pine.A41.4.10.10107131844380.181372-100000@acs5.bu.edu

Didier Utheza wrote:

> There was an interesting comparison on the net of c++, Ada95 and Modula3.
> The only critic of Ada was about the inclusion of the description of the
> private type in the specification rather than the body of the module.
> Modula3 keeps everything private in the body. I know that it was question
> to create a third type of file that would have described the private type.
> The idea was abandoned because having to deal with three files for one
> module will not have simplify things. So my question, if anybody has an
> answer, is why this choice. The inclusion of the private type defenition
> in the body should keep things modular. The specifications describing to
> the user the method to access the object in a transparent way. By
> including the private type def. in the specifications, any following
> change means that you not only have to recompile the module but also the
> whole program since the specifications changed. Where is the advantage?
> Thanks for any answer.
>                                 Didier Utheza.

My understanding is that this is an efficiency tradeoff to some extent.  The
private part of the spec provides information needed by the compiler so that
private types would not need to always involve an extra indirection into the
body definition.  You can, of course, get around it (ie reduce recompilation)
by associating an access type explicitly to an incomplete type whose
defiinition is in the package body.  The presence of this "representation"
information in the private part to the compiler when it processes client code
also aids optimization.  I believe I've heard Tucker Taft use the analogy of
logical and physical interface for the public and private parts of a spec.
I like that analogy.

- Ed




  reply	other threads:[~2001-07-13 23:06 UTC|newest]

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200107091850350230.005FE13B@smtp-po.inetia.pl>
2001-07-10  2:30 ` "is ada dead?" A challenge for all of us? Robert C. Leif, Ph.D.
2001-07-10 10:41   ` Michael Erdmann
2001-07-11  6:42     ` McDoobie
2001-07-11 14:53       ` chris.danx
2001-07-11 15:36         ` Marc A. Criley
2001-07-11 16:01           ` chris.danx
2001-07-11 16:39             ` Marin David Condic
2001-07-11 18:00               ` Al Christians
2001-07-16 11:18                 ` Stefan Skoglund
2001-07-19 21:50                   ` Kjell Mesch
2001-07-11 18:08               ` Marc A. Criley
     [not found]               ` <XN037.15614$Kf3.190690@www.newsranger.com>
     [not found]                 ` <9ikab1$fo2$1@nh.pace.co.uk>
     [not found]                   ` <3B4DB934.78DE7575@earthlink.net>
2001-07-13  2:08                     ` GLIDE Jeffrey Carter
2001-07-13 12:58                       ` GLIDE Marc A. Criley
2001-07-13 15:26                       ` GLIDE file13
2001-07-14  2:47                         ` GLIDE Jeffrey Carter
2001-07-14 13:53                           ` GLIDE Robert Dewar
2001-07-14 15:40                             ` GLIDE Jeffrey Carter
     [not found]                       ` <28d8936a.0107130726.1351ffbb@postin <3B4FB2BA.8DDFBDC4@acm.org>
2001-07-15  6:34                         ` GLIDE Simon Wright
2001-07-15 23:44                           ` GLIDE Robert B. Love 
2001-07-17 16:14                           ` GLIDE David C. Hoos
     [not found]                 ` <9ikprr$fku$1@bob.news.rcn.net>
     [not found]                   ` <Cym37.16986$Kf3.220382@www.newsranger.com>
     [not found]                     ` <un164o8w6.fsf@gsfc.nasa.gov>
     [not found]                       ` <cnX47.22238$Kf3.282845@www.newsranger.com>
     [not found]                         ` <uk8169hkf.fsf@gsfc.nasa.gov>
     [not found]                           ` <tBm57.24076$Kf3.326822@www.newsranger.com>
     [not found]                             ` <u4rs7k5v9.fsf@gsfc.nasa.gov>
     [not found]                               ` <TtY57.944$ar1.4224@www.newsranger.com>
2001-07-23 13:00                                 ` emacs Else and ada-mode Stephen Leake
2001-07-23 16:51                                   ` Marc A. Criley
2001-07-11 16:28           ` "is ada dead?" A challenge for all of us? Al Christians
2001-07-11 19:58             ` chris.danx
2001-07-11 20:56               ` McDoobie
2001-07-11 20:29         ` McDoobie
2001-07-13 12:46           ` chris.danx
2001-07-13 23:35             ` McDoobie
2001-07-11 22:04         ` Larry Kilgallen
     [not found]         ` <Qn_27.15449$Kf3.182453@www.newsranger.com>
     [not found]           ` <8P_27.27381$B56.4722193@news2-win.server.ntlworld.com>
     [not found]             ` <bp037.15593$Kf3.189375@www.newsranger.com>
     [not found]               ` <3B4C98E3.D3E66562@easystreet.com>
     [not found]                 ` <Jt137.15658$Kf3.192645@www.newsranger.com>
     [not found]                   ` <3B4CBA12.7F752364@easystreet.com>
     [not found]                     ` <Po337.15801$Kf3.197989@www.newsranger.com>
     [not found]                       ` <3B4CD02D.D6E3E53C@easystreet.com>
2001-07-12  2:54                         ` Emacs vs. the World Ted Dennison
     [not found]           ` <md837.333699$p33.6738979@news1.sttls1.wa.home.com>
     [not found]             ` <f49tktghbv140bg63a292jul1h940pj5pt@4ax.com>
     [not found]               ` <3B4F4BAC.D53B9555@PublicPropertySoftware.com>
     [not found]                 ` <9inlsv$m7l$1@nh.pace.co.uk>
     [not found]                   ` <bmK37.18791$Kf3.247815@www.newsranger.com>
2001-07-13 22:55                     ` About private types and reusability? Didier Utheza
2001-07-13 23:06                       ` Ed Falis [this message]
2001-07-14 21:02                         ` Didier Utheza
2001-07-13 23:28               ` An Ada IDE and discussions chris.danx
2001-07-14  7:08                 ` Michael Erdmann
2001-07-14 12:52                   ` chris.danx
2001-07-15  3:46                     ` Robert C. Leif, Ph.D.
2001-07-16 11:12                     ` Stefan Skoglund
2001-07-17 13:29                       ` chris.danx
2001-07-17 14:21                         ` Ted Dennison
2001-07-17 15:55                           ` chris.danx
2001-07-17 16:58                             ` Firstish Impressions of Gtk+(GtkAda): was " chris.danx
2001-07-19 20:38                             ` Ted Dennison
2001-07-18 19:27                           ` chris.danx
2001-07-16 15:05                     ` Marin David Condic
2001-07-17  7:50                       ` Emmanuel Briot
2001-07-17 10:09                         ` nicolas
2001-07-17 13:26                           ` Marin David Condic
2001-07-17 15:06                             ` nicolas
2001-07-17 15:49                               ` Marin David Condic
2001-07-17 22:42                                 ` Stefan Skoglund
2001-07-18  8:13                                   ` nicolas
2001-07-17 17:58                             ` Pascal Obry
2001-07-17 18:58                               ` Marin David Condic
2001-07-17 22:52                                 ` Stefan Skoglund
2001-07-18  6:41                                 ` Pascal Obry
2001-07-18 14:12                                   ` Marin David Condic
2001-07-18 16:33                                     ` Pascal Obry
2001-07-18 17:12                                       ` Marin David Condic
2001-07-18 18:35                                         ` Ted Dennison
2001-07-18 19:30                                           ` Marin David Condic
2001-07-20 15:41                                             ` Ted Dennison
2001-07-20 17:40                                               ` Marin David Condic
2001-07-20 20:18                                                 ` Ted Dennison
2001-07-18 19:20                                         ` Pascal Obry
2001-07-18 16:59                                     ` Making money from free software [was Re: An Ada IDE and discussions] Matthias Benkmann
2001-07-18 20:50                                       ` Marin David Condic
2001-07-19 17:08                                         ` Ted Dennison
2001-07-19 23:27                                     ` An Ada IDE and discussions Stefan Skoglund
2001-07-17 22:33                       ` Stefan Skoglund
2001-07-18 14:17                         ` Marin David Condic
2001-07-16 17:00                     ` Ted Dennison
2001-07-16 18:17                       ` Al Christians
2001-07-16 18:42                         ` Ed Falis
2001-07-16 18:28                       ` Mark Lundquist
2001-07-17  7:42                       ` Emmanuel Briot
2001-07-17 14:36                         ` Robert C. Leif, Ph.D.
2001-07-17  7:54                       ` Tor Fredrik Aas
2001-07-17 13:33                         ` Ted Dennison
2001-07-17 17:51                           ` Ted Dennison
2001-07-17 23:00                             ` Stefan Skoglund
2001-07-17 22:55                       ` Stefan Skoglund
2001-07-17 22:56                       ` Stefan Skoglund
2001-07-18 16:10                       ` McDoobie
2001-07-19 23:41                         ` Stefan Skoglund
2001-07-16 16:52                 ` Ted Dennison
2001-07-18 12:15         ` "is ada dead?" A challenge for all of us? Mats Karlssohn
2001-07-12  2:54       ` DuckE
2001-07-11  9:01   ` Dmitry Kazakov
2001-07-11 17:27     ` Michal Nowak
2001-07-11 19:14       ` tmoran
2001-07-11 20:15         ` McDoobie
2001-07-12  2:20         ` Jeffrey Carter
2001-07-13 23:34           ` Bobby D. Bryant
2001-07-21 17:48     ` GianLuigi Piacentini
replies disabled

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