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!news3.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!138.195.8.3.MISMATCH!news.ecp.fr!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: Sun, 22 Aug 2010 22:40:08 +0200 Organization: Ada At Home Message-ID: References: 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:13634 Date: 2010-08-22T22:40:08+02:00 List-Id: Le Sun, 22 Aug 2010 07:39:45 +0200, Yannick Duch=C3=AAne (Hibou57) = a =C3=A9crit: > (here, the underscore =E2=80=9C_=E2=80=9D has the same meaning as with= Prolog) This =E2=80=9C_=E2=80=9D is nice for analysis, as it explicitly state a = given component of = a structure is not used in a given branch of a recursive algorithm (or = even not recursive). I feel this help to express clean analysis. Funny: I came to an SML tutorial containing a whole paragraph talking = about Ada and how some SML constructs can be mapped to Ada. It said (the= y = seemed to like Pascal and Algol also): Roughly speaking (that is their wording) * Structures in ML corresponds to Package in Ada * Signature corresponds to an Ada Package Interface * Functor corresponds to Generic Package in Ada But they was wrong in one point, as they also ended with: =E2=80=9CHowever, ML admits structures (not just types) as parameter= s to = functors.=E2=80=9D Probably they never heard about =E2=80=9Cpackage formal parameter=E2=80=9D= . I suppose they = knew about Ada 83 and this was not there with this one (but was this = really the case ?) They also forget about discriminated records (but they did not claim the= ir = match/match list was exhaustive).