comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Some questions on a library design
Date: 1997/06/17
Date: 1997-06-17T00:00:00+00:00	[thread overview]
Message-ID: <EBxrtu.7v6@world.std.com> (raw)
In-Reply-To: Pine.SGI.3.95.970616161142.25177A-100000@shellx.best.com


In article <Pine.SGI.3.95.970616161142.25177A-100000@shellx.best.com>,
Brian Rogoff  <bpr@shellx.best.com> wrote:
>Hi,
>	In the process of writing a collection library for Ada I have 
>encountered a few stumbling blocks that I hope can be removed. The library 
>is rather like the C++ STL, and so I avoid dynamic dispatching 
>*completely*. I have also avoided tagged types although that is not
>strictly necessary.

If I were doing it, I think I would use tagged types and inheritence.
Let the client decide whether dispatching calls are too inefficient.
One nice thing about Ada, is that you can choose to use dispatching or
not, on a call-by-call basis.

>...However, I am 
>having a bit of trouble figuring out how to do this; so far I just declare
>the Red_Black_Trees package in the public part of Sets' spec, and do the
>same with Red_Black_Trees.Iterators in Sets.Iterators, like so:

Would it help to pass in a generic formal package?

- Bob




  reply	other threads:[~1997-06-17  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-16  0:00 Some questions on a library design Brian Rogoff
1997-06-17  0:00 ` Robert A Duff [this message]
1997-06-17  0:00   ` Brian Rogoff
1997-06-18  0:00     ` Robert A Duff
1997-06-18  0:00       ` Brian Rogoff
1997-06-20  0:00         ` Stephen Leake
1997-06-20  0:00           ` Brian Rogoff
1997-06-21  0:00   ` Nick Roberts
1997-06-22  0:00     ` Robert Dewar
1997-06-23  0:00     ` Tucker Taft
1997-06-20  0:00 ` Tucker Taft
replies disabled

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