Official definition of call-by-value (Re: Finding the instance reference...)

Aahz aahz at pythoncraft.com
Tue Nov 11 21:22:02 EST 2008


In article <6nul1qF100urU1 at mid.individual.net>,
greg  <greg at cosc.canterbury.ac.nz> 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.
>
>So it's perfectly correct to use it in relation to Python.

Except, of course, for the fact that it is generally misleading.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"It is easier to optimize correct code than to correct optimized code."
--Bill Harlan



More information about the Python-list mailing list