From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 6 May 93 09:39:20 GMT From: cis.ohio-state.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!darwi n.sura.net!sgiblab!munnari.oz.au!yoyo.aarnet.edu.au!news.adelaide.edu.au!usenet @ucbvax.Berkeley.EDU (Andrew Dunstan,,2285592,) Subject: Re: Passing procedures as parameters to procedures. Message-ID: <1samc8$kjd@huon.itd.adelaide.edu.au> List-Id: >>From article , by dewar@schonberg.NYU.EDU (Robert D ewar): > I actually think that in languages at the level of Ada/C etc, the notion of > pointer to procedure is clearer than the idea of a procedure as a value. > > An interesting note here is that one Algol-68 text book contained in its > helpful advice the suggestion that it was better to pass procedures by > reference rather than by value, because it would avoid inefficient copying > of the code of the procedure. This may be an extreme case, but it is a nice > indication of the confusion that can be caused by considering procedures as > values in this level of language. > Fair enough, Robert. I can also think of cases where there could be a mighty confusion between a function and the value it returns (if this is a procedural value). Still, my feeling is that, in the drive to avoid a profusion of new reserved words, many, including possible "acess" and "all", have become very overloaded. I know overloading is in the spirit of Ada :-) but this is a bit unfortunate. Syntax, however, is really a minor consideration. The important thing is expressive power. Procedural objects extend that power very markedly, but I think my example showed an area where it was missing in Ada83 and (as Tucker Taft showed in correctly ruling out my proposed 9X solution to my problem) will be missing in Ada9X. It would be a pity to be able to say that there is STILL an area where Pascal has more expressive power than Ada! (On the subject of the problem I posed, I have changed my mind! It is not insoluble - in fact I have solved it. Magnus Kempe's "solution", while not correct, was close enough that, unless I see a correct solution posted either in this news group or by email to me, I will send him a (small) bottle of Australian red. Then he can test out Thomas Jefferson's saying! However, I have dreamed up a generalised form of this problem that I still think is insoluble.) cheers andrew # Andrew Dunstan # There's nothing good or bad # # net: # # # adunstan@steptoe.adl.csa.oz.au # but thinking makes it so. # # or: andrewd@cs.adelaide.edu.au # #