What other languages use the same data model as Python?
Grant Edwards
invalid at invalid.invalid
Thu May 5 10:17:15 EDT 2011
On 2011-05-05, Gregory Ewing <greg.ewing at canterbury.ac.nz> wrote:
> harrismh777 wrote:
>> 'C' does provide for pointers which are used by all 'C'
>> programmers to firmly provide pass-by-reference in their coding
>
> Yes, but when they do that, they're building an abstraction
> of their own on top of the facilities provided by the C
> language.
I've pointed that out to him. He's talking about what _he_ does in
his program. We're talking about the C language definition and what
the compiler does.
> C itself has no notion of pass-by-reference.
Exactly. C is pass by value.
> If it did, the programmer would be able to use it directly
> instead of having to insert & and * operators himself.
That's what I was trying to say, but probably not as clearly. The "&"
operatore returnas a _value_ that the OP passes _by_value_ to a
function. That function then uses the "*" operator to use that value
to access some data.
--
Grant Edwards grant.b.edwards Yow! DIDI ... is that a
at MARTIAN name, or, are we
gmail.com in ISRAEL?
More information about the Python-list
mailing list