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,6689542a60dbcc55 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!news.mb-net.net!open-news-network.org!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Discriminated records are not the most efficient, but ... Date: Mon, 23 Aug 2010 03:52:14 +0200 Organization: Ada At Home Message-ID: References: <874oemcr37.fsf@mid.deneb.enyo.de> NNTP-Posting-Host: qaSBlvV+1zCl6PWY+jYb4w.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.61 (Win32) Xref: g2news1.google.com comp.lang.ada:13641 Date: 2010-08-23T03:52:14+02:00 List-Id: Le Sun, 22 Aug 2010 22:47:24 +0200, Florian Weimer a = = =C3=A9crit: > But doesn't that mean that the package you want to pass has to be an > instance of a generic package? I haven't seen that programming style > much. Now I've just seen about Structures and Functors (you seems to know ML, = do = you ?), and we could say =E2=80=9CAda's functors=E2=80=9D can only get f= unctors as = parameter, not structures. This should be kept in mind while mapping from ML to Ada, while honestly= , = this would be a matter only when there are children packages. But as suc= h = a package would typically encapsulate an ADT, this will most of time not= = be a matter, as most commonly such a package will not have children = (because this is not needed if well designed, except if you want to exte= nd = with access to some private parts and that is really required.. otherwis= e, = siblings rooted somewhere may be a better option). And any way, as Dmitry would tell you (and I agree): =E2=80=9Cgenerics h= ierarchies = are not always so fun=E2=80=9D.