What other languages use the same data model as Python?
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Thu May 5 11:11:33 EDT 2011
On Thu, 05 May 2011 14:14:22 +0000, Grant Edwards wrote:
> On 2011-05-05, harrismh777 <harrismh777 at charter.net> wrote:
>> Grant Edwards wrote:
>>> The "pass by value" and "pass by reference" parameter passing
>>> mechanisms are pretty well defined, and C uses "pass by value".
>>
>> Yeah, that's kind-a funny, cause I'm one of the guys (old farts) that
>> helped define them....
>
> I give up. You don't seem to understand the C language defintion or
> what is commonly meant by "pass by reference".
In fairness, he's not the only one. M Harris has twice now linked to an
IBM site that describes pass-by-reference in C in terms of passing a
pointer to the argument you want as the argument. Admittedly, doing so
gives you almost the same behaviour, except that you have to dereference
the pointers yourself.
That's a pretty big difference though, and gets to the core of the
argument: it's a bit like arguing that manual cars are fitted with
exactly the same automatic transmission as auto cars, it's just that you
have to engage the clutch and shift gears yourself.
--
Steven
More information about the Python-list
mailing list