From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,80a67c84f8039eab X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Some questions on a library design Date: 1997/06/17 Message-ID: #1/1 X-Deja-AN: 249154729 References: Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-06-17T00:00:00+00:00 List-Id: In article , Brian Rogoff 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