comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Signature Package With Generic Proceedure
Date: Mon, 23 Jul 2012 21:57:37 -0500
Date: 2012-07-23T21:57:37-05:00	[thread overview]
Message-ID: <jul2v4$cge$1@munin.nbi.dk> (raw)
In-Reply-To: 79925d0c-b2dd-44a3-9451-48f0ee19485f@googlegroups.com

"Keean Schupke" <keean.schupke@googlemail.com> wrote in message 
news:79925d0c-b2dd-44a3-9451-48f0ee19485f@googlegroups.com...
...
> This is datatype generic programming, one of the things I thought Ada is 
> good at.
> Signatures are the only way in Ada of doing this with no runtime cost, and 
> the only
> way using generics. Signatures belong to a family of constructs across 
> several languages
> with similar properties. For example:

One more caution: you can't instantiate an Ada generic with a private type, 
unless the formal type is incomplete and there are no objects for the formal 
type.

There are people that want to use signatures in Ada, but it doesn't work 
very well in Ada 2005 and before if you want good encapulation. And it only 
works well in Ada 2012 if you can use a formal incomplete type (usually you 
can if the actual package is empty, which is usually want you want for a 
signature package).

                                          Randy.





  parent reply	other threads:[~2012-07-26 14:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <045f7b44-2a4a-4292-80fd-0b6bc8ee3465@googlegroups.com>
2012-07-21 22:22 ` Signature Package With Generic Proceedure Adam Beneschan
2012-07-22  7:28   ` Dmitry A. Kazakov
2012-07-22 16:22   ` Keean Schupke
2012-07-23  0:45     ` Adam Beneschan
     [not found]       ` <79925d0c-b2dd-44a3-9451-48f0ee19485f@googlegroups.com>
     [not found]         ` <500d3a9d$0$6566$9b4e6d93@newsspool4.arcor-online.net>
2012-07-23 18:29           ` Keean Schupke
     [not found]         ` <ac8bfaed-dbcc-491a-a760-c25672445eef@googlegroups.com>
2012-07-23 19:41           ` Keean Schupke
2012-07-24  2:57         ` Randy Brukardt [this message]
     [not found]         ` <jul2n4$af5$1@munin.nbi.dk>
2012-07-24  8:02           ` Keean Schupke
2012-07-24  8:43             ` Dmitry A. Kazakov
2012-07-24  8:59               ` Keean Schupke
2012-07-23 10:26 ` Simon Wright
2012-07-23 18:36   ` Keean Schupke
replies disabled

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