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: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Some questions on a library design Date: 1997/06/20 Message-ID: #1/1 X-Deja-AN: 251410973 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1997-06-20T00:00:00+00:00 List-Id: Brian Rogoff (bpr@shellx.best.com) wrote: : ... : Also, I thought it would be cool if I could do a partial instantiation of : a generic package to create a new generic package with fewer parameters, : like : generic package Sets is new Red_Black_Trees ( Insert_Always => False ); : generic package Multisets is new Red_Black_Trees ( Insert_Always => True ); : Am I missing something, i.e., is there a good approximation to this : functionality in Ada? This is most easily done by defining a new generic that internally instantiates the generic which has more parameters. You could make the inner instantiation visible if you want to be able to pass it for a formal package parameter. Alternatively, you could create wrappers for all of its subprograms, and mark all of these wrappers with a pragma "inline." : -- Brian -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Burlington, MA USA