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=0.1 required=5.0 tests=BAYES_00,DATE_IN_PAST_12_24, FORGED_GMAIL_RCVD,FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,4885c546f6ddc77a,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.205.122.65 with SMTP id gf1mr403633bkc.2.1339693431813; Thu, 14 Jun 2012 10:03:51 -0700 (PDT) Path: e27ni47984bkw.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: sbelmont700@gmail.com Newsgroups: comp.lang.ada Subject: Dynamic accessibility Date: Wed, 13 Jun 2012 14:31:29 -0700 (PDT) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 206.53.78.59 Mime-Version: 1.0 X-Trace: posting.google.com 1339627935 9539 127.0.0.1 (13 Jun 2012 22:52:15 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 13 Jun 2012 22:52:15 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=206.53.78.59; posting-account=ShYTIAoAAABytvcS76ZrG9GdaV-nXYKy User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-06-13T14:31:29-07:00 List-Id: Hi, Does anyone have any insight or historical perspective as to why it is t= hat access parameters carry a dynamic lifetime along with them, whereas acc= ess discriminants do not? I cannot think of a good reason why you would wa= nt to try and explicitly typecast an access parameter anyway, so it would s= eem easier on everyone had parameters been defined statically as discrimina= nts are (i.e. lifetime as being declared inside the subprogram, so that it = is checked by the compiler and forbids all attempts at typecasting). =20 =20 On the other hand, if there is a good reason for doing it, then it would= seem appropriate that one would need the same ability for access discrimin= ants as well; i.e. carry along the dynamic lifetime so that someone could e= xplicitly typecast it and save it somewhere else, exactly like an access pa= rameter. =20 Is there some sort of esoteric accessibility conundrum that requires the= rules be like this, or is it a judgment call? Was it just that the implem= entation of discriminants would be more costly than that of parameters? Wa= s the intention to provide a mechanism for both, so that a programmer could= choose either way? Or is it just that the lack of out parameters for func= tions and inability to dispatch on named access types required a backdoor i= n case an unlucky programmer was forced into an access parameter, but neede= d to get back the 'real' type of controlling operand? =20 Thanks for any opinions, rants, or special secrets anyone might know. =20 -sb