From: Xavier Noria Date: 2010-11-12T18:01:07+09:00 Subject: Re: what's an object? On Fri, Nov 12, 2010 at 9:38 AM, Josh Cheek wrote: > Can we just call it "pass by object reference". Calling it "pass by value" I see no need. The stuff is pretty simple. Variables in Ruby and Java hold references, their spec say that, it is not a mental model of mine. (In the case of Java they can also store primitive values, you know.) References are opaque, but it is known that whatever they are, that's what variables hold. And the content of the variable is copied when there's a method call. > void pass_by_object_reference( Number *number ) { >  printf("Pass by object reference: %d\n" , number->value ); > } In the case of C there's no room for interpretation either. And it is even more transparent than in Ruby because pointers are data types. So that number parameter holds a data value which is a pointer, that one isn't even opaque. When the function is invoked the pointer is *copied*, that is, an integer value is copied and linked to a local variable. The exact same thing happens if the parameter is int i. The pointer value is copied into the number variable (pass by value). You can be certain the caller sees the exact same pointer when the function call returns.