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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.50.98.69 with SMTP id eg5mr1254187igb.7.1406128201257; Wed, 23 Jul 2014 08:10:01 -0700 (PDT) X-Received: by 10.50.153.77 with SMTP id ve13mr73767igb.16.1406128201119; Wed, 23 Jul 2014 08:10:01 -0700 (PDT) Path: border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!h18no6145469igc.0!news-out.google.com!eg1ni2igc.0!nntp.google.com!h18no6145466igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 23 Jul 2014 08:10:00 -0700 (PDT) In-Reply-To: <85y4vk2otd.fsf@stephe-leake.org> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=KSa2aQoAAACOxnC0usBJYX8NE3x3a1Xq NNTP-Posting-Host: 66.126.103.122 References: <1967ffbb-4dfc-4fe8-ba60-a32da0fe6620@googlegroups.com> <18igilt89njaa.n3uy7bzna7nx.dlg@40tude.net> <85y4vk2otd.fsf@stephe-leake.org> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <16b4a74e-3419-45d7-9f48-eec5ea0bf075@googlegroups.com> Subject: Re: Functions vs constants From: Adam Beneschan Injection-Date: Wed, 23 Jul 2014 15:10:01 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: number.nntp.dca.giganews.com comp.lang.ada:187806 Date: 2014-07-23T08:10:00-07:00 List-Id: On Wednesday, July 23, 2014 6:21:34 AM UTC-7, Stephen Leake wrote: > "Randy Brukardt" writes: >=20 > > One could even imagine a radical solution of having no constants at all= , as=20 > > parameterless expression functions would serve the purpose just as well= .=20 > > (Too radical, I think, as the syntax of an expression function would be= too=20 > > verbose for the use.) >=20 > What would happen if we changed the definition of a constant declaration > to be syntax sugar for the equivalant parameterless expression function? Constants behave like objects. If you have a constant of a controlled type= , it has to be Finalized like a variable object. If you say "X : constant = Access_To_Something :=3D new Something'(blahblahblah)", then how would this= work if it's syntactic sugar for a function--would it allocate a new Somet= hing every time it's accessed? =20 -- Adam