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,8029f6524ed823f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-04 03:31:04 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!chcgil2-snf1.gtei.net!news.gtei.net!news.huji.ac.il!not-for-mail From: "Ehud Lamm" Newsgroups: comp.lang.ada Subject: Re: Specialization of generics Date: Mon, 4 Jun 2001 13:23:03 +0300 Organization: The Hebrew University of Jerusalem Message-ID: <9ffnvi$qtl$1@news.huji.ac.il> References: <46ba9d66.0106031617.c802df3@posting.google.com> NNTP-Posting-Host: di3-107.dialin.huji.ac.il X-Trace: news.huji.ac.il 991650611 27573 132.64.13.107 (4 Jun 2001 10:30:11 GMT) X-Complaints-To: abuse@news.huji.ac.il NNTP-Posting-Date: Mon, 4 Jun 2001 10:30: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:8054 Date: 2001-06-04T13:23:03+03:00 List-Id: > Now the question: Is it possible to define a generic package taking > one or more types as generic formal parameters, and then define that > the generic is instantiated in a different way if the generic formal > parameters match some condition? One application I could think of > would be for an image package to handle 1-bit images in a compact way. > Short answer is that generic specialization as such doesn't exist in Ada. I am sure others will give plenty of useful suggestions how to overcome this problem. -- Ehud Lamm mslamm@mscc.huji.ac.il http://purl.oclc.org/NET/ehudlamm <== Me!