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 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!f12g2000yqn.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Hibou57_=28Yannick_Duch=EAne=29?= Newsgroups: comp.lang.ada Subject: Re: Constant as anonymous functions : the outer space beast is back Date: Fri, 5 Feb 2010 14:41:50 -0800 (PST) Organization: http://groups.google.com Message-ID: <9428b89d-1998-4d10-b244-89eac7c8d4ec@f12g2000yqn.googlegroups.com> References: <3c43bf9d-75f1-4d09-9388-65b83cafb1d9@j14g2000yqm.googlegroups.com> <454c900f-85ed-4a40-ad13-a5b432261b99@c29g2000yqd.googlegroups.com> NNTP-Posting-Host: 86.75.149.60 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1265409711 30523 127.0.0.1 (5 Feb 2010 22:41:51 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 5 Feb 2010 22:41:51 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f12g2000yqn.googlegroups.com; posting-host=86.75.149.60; 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:8926 Date: 2010-02-05T14:41:50-08:00 List-Id: On 5 f=E9v, 22:51, "Randy Brukardt" wrote: > Right, but that wouldn't be true in your suggested semantics, as the Coun= t > object would be overloadable. Even if you restricted that only to constan= ts > (of which Count is one). As you noticed later, Adam better expressed my implicit though, when he talked about the Constant keyword, so this wouldn't apply the Count of the example. > It's clear that you haven't thought this through very well. Adam notes > that you could just change the behavior of constants declared with > "constant", but that makes no sense -- a renames of a constant object > does not include the keyword constant. So such a "simple" rule > wouldn't work. I confess the rename case is a thorn there. Good or bad, by the way ? I not aware enough of some rationale, but I feel the Constant keyword should be part of Constant renaming. I'm not to suggest about it, I'm just noticing. > Moreover, it doesn't make sense to treat constants and variables > differently. Does it make more sens to treat functions without parameter and constants differently ? > The only sane choice is to change the behavior of *all* > objects -- there is nothing that special about constants. Treating consta= nts > and variables differently would introduce a major maintenance hazard. The > current principle (and one that ever programmer would expect) is that > changing a declaration from constant to variable (or the reverse) only > changes whether or not it can be written. My concurrent though was that programmer could expect that changing a declaration from constant to pure function only change the implementation. > Otherwise it ought to behave > identically. Making the visibility rules wildly different for constants a= nd > variables would not have that effect (it's quite likely changing a consta= nt > to a variable would make some if it's uses illegal using your rule). Semantically, a constant is not a variable. Whenever you change a constant to a variable, you are changing either the semantic or the specification. This objection is thus unsuitable to me. There is no legitimate reason to change a constant into a variable, unless you are changing the specification (and in turn, everything relying on it should be revised anyway). While changing a constant into a function could be legitimate (this is just changing the implementation, not the specification). Why would you turn a constant into a variable, unless you are changing some specifications ? > And it is bizarre to say that you are trying to increase consistency and > then try to treat things syntactically declared one way from equivalent > things declared in another way. How that could *increase* consistency is > beyond my comprehension. Indeed, nothing is guaranteeing I'm right. > I had seriously proposed making objects overloadable declarations for use > clause purposes only (mainly to decrease the maintenance hazard inherent = in > use clauses - which is really what you are complaining about), I don't have any trouble with Use clauses, I am never Using. > but that idea > didn't get any traction. So nothing is going to change in this area. > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Randy. I'm not aware of ADA Issues news (I use to receive it, but gave up as there was too much mails to me), but I may have a look at what you are talking about. Thanks for your comments