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,de7c66b71e353e40 X-Google-Attributes: gid103376,public From: dmitry6243@my-dejanews.com Subject: Re: Valued procedures Date: 1999/01/25 Message-ID: <78hddd$8in$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 436599971 References: <786pfu$1vb$1@nnrp1.dejanews.com> <787gb8$kp2$1@nnrp1.dejanews.com> X-Http-Proxy: 1.0 x2.dejanews.com:80 (Squid/1.1.22) for client 212.202.33.196 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Mon Jan 25 09:27:17 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.5 [en] (WinNT; I) Date: 1999-01-25T00:00:00+00:00 List-Id: adam@irvine.com wrote: > ... If you have a > function that searches a large binary tree for a key and returns a > value, it might make sense in some applications for the function to > store the key and value in a global variable, so that if the next > search uses the same key, the tree doesn't have to be searched again. > This principle was discussed in Meyer's _Object-oriented Software > Construction_.) Now imagine that instead of burying the search state in invisible globals you would like to expose it as an IN OUT parameter ... I agree that in a carefully designed program procedures with return values would be rare. As well as gotos which are allowed. I agree that they are clumsy (in most cases), but the alternative is pointers, which are much more worse. Regards, Dmitry Kazakov -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own