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,16f39b4f57339dcb,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,CP1252 Path: g2news1.google.com!postnews.google.com!j14g2000yqm.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Hibou57_=28Yannick_Duch=EAne=29?= Newsgroups: comp.lang.ada Subject: Constant as anonymous functions : the outer space beast is back Date: Tue, 26 Jan 2010 17:57:15 -0800 (PST) Organization: http://groups.google.com Message-ID: <3c43bf9d-75f1-4d09-9388-65b83cafb1d9@j14g2000yqm.googlegroups.com> NNTP-Posting-Host: 86.75.149.119 Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1264557435 30461 127.0.0.1 (27 Jan 2010 01:57:15 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 27 Jan 2010 01:57:15 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j14g2000yqm.googlegroups.com; posting-host=86.75.149.119; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8827 Date: 2010-01-26T17:57:15-08:00 List-Id: Hi, I'm back with the topic =93 constant as anonymous functions =94 ( I've opened last year, about 10 months ago if my mind is right ) with a new argument advocating for it : I have a simple design rule which state that I automatically add a =93 pragma Elaborate_Body =94 in the heading of a package specification, as soon as this package defines functions which have the semantic of constants, because dependencies to the specifications as supposed to be possible dependencies to these =93 constants =94, and as elaboration of these =93 constants =94 requires body elaboration, a dependency to such a package specification is supposed to probably requires body elaboration. Here we are : the lack of constants as anonymous functions turn into consequences on the package elaboration order. That's big (at least to me). Another argument : enabling constants to be anonymous functions would allow to change a functions into a constant without breaking anything, unlike what is in the actual state. Actually, there seems to be a kind of implementation dependency in specifications due to the lack of constants as functions. Third, but already pointed (as I remember) when the topic was opened about ten months ago : this would not break any existing sources and designs. Who want to talk about this subject ?