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: a07f3367d7,39579ad87542da0e X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 X-Received: by 10.66.27.44 with SMTP id q12mr2764014pag.9.1367283654545; Mon, 29 Apr 2013 18:00:54 -0700 (PDT) Path: bp1ni1106pbd.1!nntp.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news.glorb.com!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Seeking for papers about tagged types vs access to subprograms Date: Tue, 30 Apr 2013 03:00:07 +0200 Organization: Ada @ Home Message-ID: References: <8b517bcc-c85a-413a-abd3-1f232f764473@googlegroups.com> NNTP-Posting-Host: ZXqOjp+NNxswgqXUj66j5g.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.15 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 X-Received-Bytes: 2718 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2013-04-30T03:00:07+02:00 List-Id: Le Tue, 30 Apr 2013 02:41:35 +0200, Shark8 a = = =C3=A9crit: > On Monday, April 29, 2013 6:31:37 PM UTC-6, Hibou57 (Yannick Duch=C3=AA= ne) = > wrote: >> >> Same question in the context of `Ada.Finalization`. Similar semantic = = >> could >> have been made available without requiring tagged types. > > This is true; but it's likely that tagged-types were the easiest metho= d = > to implement it. I don't know if this was the easiest, but I personally feel this may be = = was the option offering the biggest use=E2=80=91case coverage. I though relying on tagged type allowed to be the most general as = possible. Defining an `Ada.Finalization` applicable to tagged types, = obviously requires tagged types. On the other hand, as what's not using = = tagged type, may be redefined with little modification, to use tagged = types, using tagged types was the best option to cover the most general = = case, even the ones not using tagged types in the first place. However, tagged types may be excluded (ex. if there are proof = requirements) or not available (ex. the runtime in use does not support = = it). That's a bit a pity to not be able to use something like = `Ada.Finalization` for applications not using tagged types. I even belie= ve = `Ada.Finalization` is harder to avoid than tagged types = (`Ada.Finalization` looks more fundamental to me), especially that it = comes with added safety (as much as strong typing and ability to return = = unconstrained types are). -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity