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,8e7ac81a215f128c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news4.google.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Using Red-Black Trees Date: Wed, 17 Nov 2010 23:59:13 +0100 Organization: Ada @ Home Message-ID: References: <2419e829-6f45-4075-9005-b9876beb8aaa@r6g2000vbf.googlegroups.com> <46306fd9-21dc-40df-88e7-fc7e568399a4@k11g2000vbf.googlegroups.com> NNTP-Posting-Host: w00cPq0BvzOlRCSRJJEoeQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.63 (Win32) Xref: g2news2.google.com comp.lang.ada:16531 Date: 2010-11-17T23:59:13+01:00 List-Id: Le Wed, 17 Nov 2010 06:10:22 +0100, Adam Beneschan a = =C3=A9crit: > (And to *really* dream, an > implementation could provide an operation in a child package to allow > the caller to select from a set of optimization options and then > provide alternate implementations. No, I'm not volunteering to do the= > work :) ) > > -- Adam How do you get, with Ada, something similar to what you have with SML, I= = mean multiple structures all implementing a same signature ? = Unfortunately, with Ada, there is no way to do it without tagged/interfa= ce = types (if a package interface specifies operations, then it must a packa= ge = body which implements, =E2=80=A6 in one way only). Would be nice to be a= ble with = Ada to have this SML feature: =E2=80=9Cfor that package specification, u= se that or = this implementation.=E2=80=9D I don't see a way to do that using child packages, as the implementation= = of an operation specified in a package interface cannot be deferred to a= = (or multiple) child package. Child package can only extent. -- = Si les chats miaulent et font autant de vocalises bizarres, c=E2=80=99es= t pas pour = les chiens. =E2=80=9CI am fluent in ASCII=E2=80=9D [Warren 2010]