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: 103376,91276ec2ea911d3f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Thu, 07 Sep 2006 22:34:18 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: Subject: Re: Generic procedures and their parameters Date: Thu, 7 Sep 2006 22:35:44 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-sxqdlX/iHaQt1TA8iiJCKxiuBBBOS7IPFxK+rhTmwZiuflDHbMHasPAjWMB+Rey41SwtzYK5IZYdIOW!9u1lmji8hRtXkvNEtDd2iF2pT8bqGqSo19OhVcryJAU1rREaKdSlEDSFPjZP2sKaMS/6qebKkjCs!RinO3Hc1WR4p1g== X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.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:6513 Date: 2006-09-07T22:35:44-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:w0vh1ugsvkj1$.2fnx5mt0tplm$.dlg@40tude.net... ... > The reverse is a different story. It is a pity that Ada does not have > attributes to get the index and element types from the array type > (container type). The next step would be getting "<" from the element type, > which would eliminate a need to have Sort generic. That doesn't really work. "<" is what controls how the items are sorted, and it is common to want to sort the same type in multiple ways. If you have employee records, you might want to sort them both on Social Security numbers and on date of employment, for example. Two generic instantiations work fine for that, but there isn't any way to have two "<" with different behaviors. We had this discussion when looking at the possibility of having a sorting interface. It just doesn't work well, because there can only be a single implementation. (That is a problem with any scheme based on inheritance.) That's why I view interfaces less as types and more as properties that are either present or absent on any individual specific type. Randy.