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: Notesfiles $Revision: 1.7.0.10 $; site ada-uts Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!ima!inmet!ada-uts!richw From: richw@ada-uts Newsgroups: net.lang.ada Subject: Re: ForTran-Ada + flamette + question Message-ID: <4700037@ada-uts> Date: Wed, 28-May-86 12:56:00 EDT Article-I.D.: ada-uts.4700037 Posted: Wed May 28 12:56:00 1986 Date-Received: Fri, 30-May-86 08:35:28 EDT Nf-ID: #R:<8605210805.AA20308@ucbvax.Berke:-40:ada-uts:4700037:200:2242 Nf-From: ada-uts!richw May 28 12:56:00 1986 List-Id: > Unfortunately, Ada seems to be designed to make that as hard > as possible. > : > The only way I can see to simulate procedure pointers is to > define an enumeration type with elements corresponding to > the procedures that may be pointed to... I personally don't think this is so bad or "hard". In any case, read on... > The Steelman requirement 5D says: "Procedures, functions, types, > labels, exception situations, and statements shall not be > assignable to variables, be computable as values of expressions, > or be usable as nongeneric parameters to procedures or > functions." This is a major lossage, in my view, compared to > the reasonable design in (e.g.) Modula-2 for defining procedure > pointers. The most common complaint about Ada is that it's too large -- you're suggesting that they should've added more? Even though it really isn't that hard to do what you want without this feature? In my own experience with CLU and C, both of which allow procedures as arguments, the feature just wasn't used all that much to justify its existence... In any case, you have overlooked the fact that Ada provides generics which, although it can't be used for this particular case because generic instantiation happens at compile time, can often be used where one would like to define a subprogram which takes a subprogram as a argument... It would've been REAL nice if they added Smalltalk-like inheritance to Ada, too. What about type inference? Or logic programming features like Prolog? Or the ability to create functions at run-time like in Lisp (which is pretty much what you want for this application)? You've gotta draw the line somewhere. I'm continually amazed how people complain that Ada has either too much or not enough because it's left out their favorite feature from language X. Considering the design goals for Ada, I think they did a good (not perfect) job of designing a language with which you can write both efficient and abstract, safe programs. > Vincent Broman, code 632, Naval Ocean Systems Center, San Diego, CA 92152, USA > Phone: +1 619 225 2365 {seismo,caip,ihnp4,ucbvax}!\\\\\\\ > Arpa: broman@bugs.nosc.mil Uucp: {floyd,moss,bang,hp-sdd,sdcsvax}!noscvax!broman Rich Wagner