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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2308afbbe4ecec0b X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Subverting 'Access for Sub-programs Date: 1999/08/11 Message-ID: <7osa8r$gdq$1@nnrp1.deja.com>#1/1 X-Deja-AN: 511489631 References: <37A71EF1.2201@dera.gov.uk> <37A7FDE8.4F5@dera.gov.uk> <7o9vrv$qgt$1@wanadoo.fr> <7oc5ih$6mb$1@wanadoo.fr> <7oejga$28i$1@nnrp1.deja.com> <37AEF7BF.7BBC8E06@averstar.com> <7oqahu$3s0$1@nnrp1.deja.com> <37B18CF0.F50A802B@gandalf.atm.fh-luebeck.de> X-Http-Proxy: 1.0 x38.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Wed Aug 11 17:01:23 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-08-11T00:00:00+00:00 List-Id: In article <37B18CF0.F50A802B@gandalf.atm.fh-luebeck.de>, "Dmitry A. Kazakov" wrote: > I believe that the actual problem is in using pointers. In 90%, I would > say, there is > no need to pass a subroutine by pointer. It should be passed by > reference: What we > need is something like (syntax is imaginary): But passing subprograms as parameters is only one of many possible uses of subprogram pointers. Indeed it is one of the weakest uses, in that this particular use often can be replaced by generics. The motivation for providing pointers to subprograms during the Ada 95 design was driven by other uses entirely, most notably by the need for implementing call backs (and of course if you think about it the use of procedure pointers implicit in dynamic dispatching is also another kind of use completely unrelated to the call by reference notion). That being said, there is certainly nothing wrong with providing a general capability here (as is done in Algol-68). Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.