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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,96daa6f775bc14b9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-02 12:21:15 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!washdc3-snh1.gtei.net!chcgil2-snf1.gtei.net!news.gtei.net!news.huji.ac.il!not-for-mail From: "Ehud Lamm" Newsgroups: comp.lang.ada Subject: Re: Generics??? Date: Mon, 2 Jul 2001 21:54:21 +0300 Organization: The Hebrew University of Jerusalem Message-ID: <9hqgfg$v5h$1@news.huji.ac.il> References: <3B40F6BA.63A5C0FB@ida.his.se> <3B40B485.F9E4074B@worldnet.att.net> NNTP-Posting-Host: di3-70.dialin.huji.ac.il X-Trace: news.huji.ac.il 994100531 31921 132.64.13.70 (2 Jul 2001 19:02:11 GMT) X-Complaints-To: abuse@news.huji.ac.il NNTP-Posting-Date: Mon, 2 Jul 2001 19:02:11 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Xref: archiver1.google.com comp.lang.ada:9345 Date: 2001-07-02T21:54:21+03:00 List-Id: James Rogers wrote in message news:3B40B485.F9E4074B@worldnet.att.net... > Short answer: You can't. It would be a violation of Ada's strong > typing. > True enough. However, you can decalre the type "private" and import operations: generic type T is private; with function "+"(A,B:T) return T is <>; and than pass the correct routines when instantiating. With the "is <>" syntax you don't even have to explicitly pass the routines. Another solution would be to use a generic signature package. -- Ehud Lamm mslamm@mscc.huji.ac.il http://purl.oclc.org/NET/ehudlamm <== Me!