Sujet : Re: on call by reference
De : jfairchild (at) *nospam* tudado.org (Johanne Fairchild)
Groupes : comp.lang.schemeDate : 21. Mar 2024, 00:50:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <87r0g4cyb2.fsf@tudado.org>
References : 1 2 3 4
Alan Bawden <
alan@csail.mit.edu> writes:
Johanne Fairchild <jfairchild@tudado.org> writes:
>
If I understand it right, call-by-reference means the same variable that
was outside of a procedure call gets passed in to the procedure. So if
I assign a new value to it, it /must/ change the value outside because
it is the /same/ variable. So I would've expected the analogy to
somehow say that call-by-reference doesn't let me change socks at all.
>
You would? You must be completely mis-interpreting my analogy because I
cannot for the life of me figure out how you came to that expectation!
But don't sweat it -- it's just an analogy. Stick to what I said
first: "x[1] = 4" does not make "x" refer to a different thing.
I didn't understand the analogy. (I'm slow!) I have a clue what the
misunderstanding is, but let's leave it alone. The example is good and
I feel I understand the concept now. Thank you so much.