From: Jeffrey Carter <spam@spam.com>
Subject: Re: What is the point of Private?
Date: Sat, 30 Apr 2005 03:27:42 GMT
Date: 2005-04-30T03:27:42+00:00 [thread overview]
Message-ID: <OWCce.2054$HL2.885@newsread3.news.pas.earthlink.net> (raw)
In-Reply-To: <3debqiF6s66aeU1@individual.net>
Peter Amey wrote:
>
> I think there are real compiler design issues here. Modula 2 had
> "opaque types" which were conceptually similar to private types.
> However, Modula 2 had no equivalent of a package's private part which
> meant that the size of the opaque type wasn't known and that all
> implementations therefore required an opaque type to be implemented as a
> pointer. Ada's scheme means the size is known to the compiler from the
> package spec alone.
Right. That's why it's not really needed by the compiler (which was the
explanation I got in 1984), but it does make compilers a little simpler
and eliminates the overhead of the indirection.
--
Jeff Carter
"Spam! Spam! Spam! Spam! Spam! Spam! Spam! Spam!"
Monty Python's Flying Circus
53
next prev parent reply other threads:[~2005-04-30 3:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-28 23:22 What is the point of Private? Simon Smith
2005-04-28 23:40 ` Ed Falis
2005-04-29 3:14 ` Jeffrey Carter
2005-04-29 9:07 ` Peter Amey
2005-04-30 3:27 ` Jeffrey Carter [this message]
2005-04-30 0:49 ` chris
2005-05-01 22:57 ` Simon Smith
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox