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-Thread: a07f3367d7,bed01d177eaef486 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.76.99 with SMTP id j3mr308790paw.45.1343313016889; Thu, 26 Jul 2012 07:30:16 -0700 (PDT) MIME-Version: 1.0 Path: p10ni61947386pbh.1!nntp.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx02.iad01.newshosting.com!newshosting.com!216.196.98.146.MISMATCH!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!border6.newsrouter.astraweb.com!news.astraweb.com!border6.a.newsrouter.astraweb.com!feed.xsnews.nl!border-3.ams.xsnews.nl!newsfeed.straub-nv.de!news.swapon.de!nuzba.szn.dk!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Signature Package With Generic Proceedure Date: Mon, 23 Jul 2012 21:57:37 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <045f7b44-2a4a-4292-80fd-0b6bc8ee3465@googlegroups.com> <88734b25-68e5-42b2-89ea-0c0e3fc9fbc5@googlegroups.com> <93f32ea9-a61d-4148-83be-258ae0676cac@googlegroups.com> <79925d0c-b2dd-44a3-9451-48f0ee19485f@googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1343098660 12814 69.95.181.76 (24 Jul 2012 02:57:40 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 24 Jul 2012 02:57:40 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Received-Bytes: 2476 Date: 2012-07-23T21:57:37-05:00 List-Id: "Keean Schupke" wrote in message news:79925d0c-b2dd-44a3-9451-48f0ee19485f@googlegroups.com... ... > This is datatype generic programming, one of the things I thought Ada is > good at. > Signatures are the only way in Ada of doing this with no runtime cost, and > the only > way using generics. Signatures belong to a family of constructs across > several languages > with similar properties. For example: One more caution: you can't instantiate an Ada generic with a private type, unless the formal type is incomplete and there are no objects for the formal type. There are people that want to use signatures in Ada, but it doesn't work very well in Ada 2005 and before if you want good encapulation. And it only works well in Ada 2012 if you can use a formal incomplete type (usually you can if the actual package is empty, which is usually want you want for a signature package). Randy.