Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!samuel From: samuel@bifrost.cs.cornell.edu (Samuel M. Weber) Newsgroups: comp.lang.misc Subject: Re: swap(x,y) in Algol 60 Message-ID: <31728@cornell.UUCP> Date: 2 Sep 89 20:43:17 GMT References: <31690@cornell.UUCP> Sender: nobody@cornell.UUCP Reply-To: samuel@cs.cornell.edu (Samuel M. Weber) Organization: Cornell Univ. CS Dept, Ithaca NY Lines: 16 Keywords: swap, algol In article <31690@cornell.UUCP> bard@cs.cornell.edu (Bard Bloom) writes: >I have seen a folk theorem that it is impossible to define swap(x,y) in >Algol, where swap is supposed to be a procedure with two call-by-name integer >arguments which exchanges their values. > >I've asked around MIT and some at Cornell, and nobody seems to have a >reference to the statement or proof. Anyone remember where this came from? On page 428 of the new Dragon book it says "A correctly working version of swap apparently cannot be written if call-by-name is used.", and references Fleck, A. C. "The impossibility of content exchange through the by-name parameter transmission technique." SIGPLAN Notices 11:11 (November 1976) -- Sam Weber samuel@cs.cornell.edu