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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!vrdxhq.UUCP!drm1 From: drm1@vrdxhq.UUCP (Donn Milton) Newsgroups: net.lang.ada Subject: Procedure Parameters in Ada Message-ID: <8606042209.AA23350@vrdxhq.uucp> Date: Wed, 4-Jun-86 18:09:02 EDT Article-I.D.: vrdxhq.8606042209.AA23350 Posted: Wed Jun 4 18:09:02 1986 Date-Received: Sat, 7-Jun-86 08:42:40 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet List-Id: Many people seem to be unaware of a major problem entailed by procedures as parameters. That is, when procedures are allowed as parameters, strong type-checking becomes generally undecidable (not just hard) UNLESS recursive mode-type declarations (a la Algol 68) are introduced. For example, in languages like Fortran, Algol 60, PL/1, and C, strong type-checking cannot be done. This was proved formally by Langmaack in "On Correct Procedure Parameter Transmission in Higher Programming Languages," Acta Informatica, Vol. 2, 1973, pp. 110-142. With the declaration mechanism available in Algol 68, it is possible to declare "a procedure that has two parameters: an integer and a procedure that has two parameters: an integer and a procedure that has two parameters ..." ad infinitum, which is required for strong type-checking of procedure parameters. Understand that type equivalence in Algol 68 means structural equivalence, while type equivalence in Ada means name equivalence -- thus type-checking is much simpler in Ada. However, I do not understand why such a declaration mechanism, which would allow procedures as parameters with strong type-checking, was not included in Ada. Algol 68 had demonstrated its feasibility (with some elegance), and, as far as I know, this capability is not a source of significant compile-time or run-time inefficiencies. Donn Milton