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, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!sri-spam!mordor!lll-crg!seismo!nbires!rcd From: rcd@nbires.UUCP (Dick Dunn) Newsgroups: net.lang.ada Subject: Re: Enumerated "procedural" parameters Message-ID: <438@opus.nbires.UUCP> Date: Thu, 3-Jul-86 03:03:26 EDT Article-I.D.: opus.438 Posted: Thu Jul 3 03:03:26 1986 Date-Received: Fri, 4-Jul-86 07:34:58 EDT References: <4700042@ada-uts> <8606220749.AA27775@ucbvax.Berkeley.EDU> Organization: NBI,Inc, Boulder CO List-Id: I think it's unfortunate that anyone ever suggested the idea of enumerating procedures which might be called and suppying an enumeration value instead of a procedural parameter. The question [I hope!] was never whether one could construct an Ada program which would have the same effect as a program in another language using procedural parameters...Turing equivalence is a nice tool but it's not the point. The fact that not all languages have procedural parameters gives some weight to the Ada position. The fact that C, Pascal, Modula, FORTRAN, Algol, and many other languages do have procedural parameters gives weight to the position that the lack of procedural parameters is a shortcoming of Ada. The argument that procedural parameters can be simulated is really irrelevant. The issues have to do with convenience and safety, not simple expressive power in a theoretical sense. (Most languages are equivalent in that theoretical sense.) Hence the discussion would be much more useful if it concentrated on Ada solutions which represent something like procedural parameters with a notation comparably concise and convenient. Adding an enumerated type, constructing the (unenforced!) correspondence between enumeration values and procedures, and replacing a single procedure invocation with a case statement over an enumeration value (assuming that the set of procedures of interest is actually a priori enumerable!) is not at all the same in any way of interest to a practicing programmer. A better answer is necessary here. -- Dick Dunn {hao,ucbvax,allegra}!nbires!rcd (303)444-5710 x3086 ...Simpler is better.