comp.lang.ada
 help / color / mirror / Atom feed
* Interfaces and Generics?
@ 2003-09-15 23:41 chris
  2003-09-16 23:52 ` Robert I. Eachus
  0 siblings, 1 reply; 4+ messages in thread
From: chris @ 2003-09-15 23:41 UTC (permalink / raw)


Hi,

Will Ada 200x (Ada XP ;) )  revise generics for the new interfaces that 
will be present?  I expect so, but I thought I'd ask anyway.

For example, will you be able to specify that a generic package only 
deals with something that implements two (or more) given interfaces?


Just Curious,
Chris




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Interfaces and Generics?
  2003-09-15 23:41 Interfaces and Generics? chris
@ 2003-09-16 23:52 ` Robert I. Eachus
  2003-09-17 11:13   ` Lutz Donnerhacke
  2003-09-17 21:06   ` Randy Brukardt
  0 siblings, 2 replies; 4+ messages in thread
From: Robert I. Eachus @ 2003-09-16 23:52 UTC (permalink / raw)


chris wrote:
> Hi,
> 
> Will Ada 200x (Ada XP ;) )  revise generics for the new interfaces that 
> will be present?  I expect so, but I thought I'd ask anyway.
> 
> For example, will you be able to specify that a generic package only 
> deals with something that implements two (or more) given interfaces?

If I understand you correctly, you would like to be able to say:

generic
   type Foo is new A with B, C;
package Bar is...

If so, it is a very good question.  I don't think it is currently part 
of the proposal.  I am also not sure how useful it would be, but it 
would certainly be a good idea for orthogonality reasons.

-- 
                                               Robert I. Eachus

"As far as I'm concerned, war always means failure." -- Jacques Chirac, 
President of France
"As far as France is concerned, you're right." -- Rush Limbaugh




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Interfaces and Generics?
  2003-09-16 23:52 ` Robert I. Eachus
@ 2003-09-17 11:13   ` Lutz Donnerhacke
  2003-09-17 21:06   ` Randy Brukardt
  1 sibling, 0 replies; 4+ messages in thread
From: Lutz Donnerhacke @ 2003-09-17 11:13 UTC (permalink / raw)


* Robert I. Eachus wrote:
> If I understand you correctly, you would like to be able to say:
>
> generic
>    type Foo is new A with B, C;
> package Bar is...
>
> If so, it is a very good question.  I don't think it is currently part
> of the proposal.  I am also not sure how useful it would be, but it
> would certainly be a good idea for orthogonality reasons.

What about 'type Foo is new A, B, C with private;'?



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Interfaces and Generics?
  2003-09-16 23:52 ` Robert I. Eachus
  2003-09-17 11:13   ` Lutz Donnerhacke
@ 2003-09-17 21:06   ` Randy Brukardt
  1 sibling, 0 replies; 4+ messages in thread
From: Randy Brukardt @ 2003-09-17 21:06 UTC (permalink / raw)


"> chris wrote:
> Hi,
>
> Will Ada 200x (Ada XP ;) )  revise generics for the new interfaces that
> will be present?  I expect so, but I thought I'd ask anyway.
>
> For example, will you be able to specify that a generic package only
> deals with something that implements two (or more) given interfaces?

Yes. Interfaces are both supported in formal derived types and with a new
formal interface type.

BTW, the syntax of the examples that Robert Eachus has been giving is all
wrong. Look at the AI itself to see the syntax:
http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00251.TXT. (Note: I've got
a new version that will be posted soon.)

                        Randy.








^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-09-17 21:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-15 23:41 Interfaces and Generics? chris
2003-09-16 23:52 ` Robert I. Eachus
2003-09-17 11:13   ` Lutz Donnerhacke
2003-09-17 21:06   ` Randy Brukardt

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