Sujet : Re: on call by reference
De : alan (at) *nospam* csail.mit.edu (Alan Bawden)
Groupes : comp.lang.schemeDate : 21. Mar 2024, 00:22:14
Autres entêtes
Organisation : ITS Preservation Society
Message-ID : <86ttl0pmqx.fsf@williamsburg.bawden.org>
References : 1 2
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
Schol-R-LEA <
alicetrillianosako@gmail.com> writes:
Johanne Fairchild:
> I tried to answer whether Scheme was call-by-reference and I did not
> think the definition of call-by-reference seen on the web is precise
> enough.
Scheme is call-by-value; arguments to procedures are copied into the
parameters in the procedure's environment. As I understand it, even when
the argument is a reference - such as with a list - a full copy of the
argument is made local to the procedure.
If by "a full copy" you mean that a list passed to a procedure will be
copied, then you are mistaken.
- Alan