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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,799e6e37c90ca633 X-Google-Attributes: gid103376,public From: dewarr@my-dejanews.com Subject: Re: Future Ada language revisions? Date: 1998/10/05 Message-ID: <6vbhcd$5jb$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 398049985 References: <6um7on$db5$1@nnrp1.dejanews.com> <6umk64$pt0$1@nnrp1.dejanews.com> <3618DAE7.326A@oen.siemens.de> X-Http-Proxy: 1.0 x12.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Mon Oct 05 22:31:41 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/2.02 (OS/2; I) Date: 1998-10-05T00:00:00+00:00 List-Id: In article , Brian Rogoff wrote: > Actually Alfred, Ada 95 *does* support the equivalent of C function > pointers, although you'll have to use the Ada terminology "access to > subprogram" to find them. > > If you really want to be a trouble-maker, you'll complain that the > limitations on them make them only as powerful as C's function pointers, > and less powerful than Pascal's function arguments (terminology?), and in > that case I can point you directly to the long arguments on why they are > so restricted :-) Well Brian has a (well known to us here) axe to grind here, but the above is a bit misleading. In fact in most respects the access-to-procedure values of Ada are far more powerful than the procedure parameters of Pascal, in that they are non-limited types that can be freely assigned. Yes it is true that there are some limitations on the use of procedure parameters referring to nested procedures, but on the other hand, many of the purposes for which procedure parameters are used in Pascal are preferably implemented using generics in the case of Ada, which are far more powerful than anything Pascal has to offer. For a good idea of how the use of generics and access-to-procedure approaches compare, look at the g-hesorg.ads/adb and g-hesora.ads/adb files in the GNAT distribution, these are respectively a generic and access-to-procedure implementation of an optimized heapsort that does N log N comparisons (instead of the usual 2 N log N). -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own