comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephe.Leake@nasa.gov>
Subject: Re: How to hide type internals
Date: Sun, 02 Jul 2006 11:23:02 -0400
Date: 2006-07-02T11:23:02-04:00	[thread overview]
Message-ID: <uu060rpyh.fsf@nasa.gov> (raw)
In-Reply-To: 1151664636.528401.15590@d56g2000cwd.googlegroups.com

"Gerd" <GerdM.O@t-online.de> writes:

> I would like to write a package that exports functions using a special
> type, without showing the details in the spec (even not in the private
> part).

Others have shown how to do this.

But I'd like to understand _why_ you want to do this.

If it is just to explore the capabilities of the language, that's
fine. 

But you should also understand the compiler issues involved. The
reason Ada provides a private part in package specs is to provide
information to the compiler to allow it to generate more efficient
code (not using pointers, for example). 

One downside of providing information in the spec is more
recompilation when the private part changes.

-- 
-- Stephe



  parent reply	other threads:[~2006-07-02 15:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-30 10:50 How to hide type internals Gerd
2006-06-30 11:19 ` claude.simon
2006-07-04 11:13   ` Gerd
2006-06-30 11:26 ` Alex R. Mosteo
2006-07-02 15:23 ` Stephen Leake [this message]
2006-07-04 11:11   ` Gerd
replies disabled

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