On 2008-11-12, greg <[EMAIL PROTECTED]> wrote: > Here is the definition of call-by-value from the > "Revised Report on the Algorithmic Language Algol 60" ><http://www.masswerk.at/algol60/report.htm>: > > 4.7.3.1. Value assignment (call by value). All formal parameters quoted in > the > value part of the procedure declaration heading are assigned the values (cf. > section 2.8. Values and types) of the corresponding actual parameters, these > assignments being considers as being performed explicitly before entering the > procedure body. The effect is as though an additional block embracing the > procedure body were created in which these assignments were made to variables > local to this fictitious block with types as given in the corresponding > specifications (cf. section 5.4.5). > > There you have it -- call by value is offially defined in > terms of assignment. There is no mention in there of copying.
Call by value is officially defined in terms of assignment in a context where assignments means copying and in a definition of a specifix language. You can't lift this part out of the definition of algol 60 and say it applies equally well in languages with different assignment semantics. If call by value is defined in terms of assignment regardless of what the semantics of the assignment is then IMO call by value is rather useless term and it would be better to talk about call by copy in the case of C, to make sure one understands the difference between what happens in C and what happens in other languages that also have "call by assignment" but behave very differently. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list