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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a84eaf8fb2470909 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 21 Dec 2006 20:59:51 -0600 From: "Steve" Newsgroups: comp.lang.ada References: <1166710494.869393.108730@a3g2000cwd.googlegroups.com> Subject: Re: Ada generics Date: Thu, 21 Dec 2006 19:01:50 -0800 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-RFC2646: Format=Flowed; Original Message-ID: NNTP-Posting-Host: 24.20.111.245 X-Trace: sv3-HYZi8l6hzxk3qsrzSdeP1TGdUcigPkiur6Xihcmtce62LBFW8/+5dGlRyZ1wgBKK1ZAwUOifvkhumbV!/+6ktOMVDeXYXOreZEOdJ81FNV7mnvWiGubIYgUdqEyRRvg15vP+oMoTCe/c5M9PKIS+jjdY+qkZ!b7d9LEXAEcJr8w== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:7980 Date: 2006-12-21T19:01:50-08:00 List-Id: "markww" wrote in message news:1166710494.869393.108730@a3g2000cwd.googlegroups.com... > Hi, > > I'm trying to compare generics in Ada vs C++ templates and Java > generics. Is there anything Ada generics can do that C++ or Java > cannot? I read that the Ada system was safer than C++ templates. I'm > just looking for some distinctive features. > > Thanks > The most distinct feature in my view is that if the code for the generic compiles then an instantiation of the generic will also compile. I have in the past tried to instantiate a C++ template and received a compile time error deeply nested in the template source code, due to some specific requirement that was not met instantiating the template. For instance the template may require that some specific method be implemented by a type used to instantiate the template. Steve (The Duck)