Saturday, August 17, 2013

Call by Name and Call by Value

But now thus says the LORD, he who created you... Fear not, for I have redeemed you; I have called you by name , and you are mine. (Isaiah 43:1,2)
Every computer science student has to learn about how you pass parameters to a procedure, and how you get results back.  Code like

procedure add(a,b,c);
 begin
 a := b+c;
 end;

is unlikely to have the effect that the novice programmer intends.  The parameters a,b,c are evaluated on procedure entry, and only their values passed to the procedure (this is known as call by value). As a result, the actual parameters on procedure exit are all unchanged.

To write a procedure that will actually update a, as the above code is intended to do, one has to do something different. When I was learning to code (in BCPL) one had to use indirection, passing a pointer to the variable rather than the variable itself; but many high-level languages have alternative calling mechanisms that can be invoked by a declaration, such as call by name, and these allow passing a parameter that can be modified by the procedure.  Oversimplifying things quite a bit leads to a phrase which, for me, resonates a lot with the quotation from Isaiah:
Only what is called by name can be truly changed.
Isn't this thought a central one in the biblical drama? The LORD calls his people, not because they yield something of value to him, but because he wishes to establish a relationship, to "call them by name".  And in this relationship there is the possibility of true change, of something new and beautiful appearing - a possibility which is not there in a relationship based on "value" and reward (Philippians 3:3-11).

Now in the creation story, humanity is described as being created in the "image" of God.  I find the interpretation quite plausible which suggests that this refers to humanity's acting as God's vicegerent towards the created world.  If so, humanity's manner of relating to that world should mirror God's manner of relating to us.  So, when we treat the creation simply as a supply of "natural resources" for use in our projects, is that "call by name" or "call by value"?  I think the answer is clear.  What would "call by name" look like?

Image: detail of Michaelangelo's fresco The Creation of Adam.  Source: Wikimedia Commons

1 comment:

Unknown said...

Wow, how awesome this idea. The variable was initialise in Eden when we ate the fruit of good and evil and now God calls each of us by name to set a new true and good value.
Only those who respond to the call will get the value.
Thank you very much for a good illustration of relationship between God and humans.