on call by reference

Liste des GroupesRevenir à cl scheme 
Sujet : on call by reference
De : jfairchild (at) *nospam* tudado.org (Johanne Fairchild)
Groupes : comp.lang.scheme
Date : 19. Mar 2024, 10:55:18
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <877chyiosp.fsf@tudado.org>
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.  For instance,

  Call by reference (or pass by reference) is an evaluation strategy
  where a parameter is bound to an implicit reference to the variable
  used as argument, rather than a copy of its value. This typically
  means that the function can modify (i.e., assign to) the variable used
  as argument—something that will be seen by its caller.

  Source:
  https://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_reference

It doesn't say how the modification is done.  So we can say that Python
is call-by-reference, but surely not whe the data is imutable---then
Python is sometimes call-by-reference.  Just this observation already
makes a language sometimes call-by-reference and sometimes not.  So

  ``Is Scheme call-by-reference?'' 

would not make any sense.  We can change data by way of its
argument---set-car!, say.  On the other hand, in Scheme arguments are
passed with an implicit reference to the variable, so it is
call-by-reference, except perhaps when the argument is immutable.

So I am totally confused.  These definition seem like a mess.

Can you point me out to good definitions you might know of in academic
books on the subject?  Thank you.

Date Sujet#  Auteur
19 Mar 24 * on call by reference19Johanne Fairchild
20 Mar 24 +- Re: on call by reference1Lawrence D'Oliveiro
20 Mar 24 +* Re: on call by reference3Dmitri Volkov
20 Mar 24 i+- Re: on call by reference1Lawrence D'Oliveiro
20 Mar 24 i`- Re: on call by reference1Schol-R-LEA
20 Mar 24 +* Re: on call by reference4Alan Bawden
20 Mar 24 i`* Re: on call by reference3Johanne Fairchild
21 Mar 24 i `* Re: on call by reference2Alan Bawden
21 Mar 24 i  `- Re: on call by reference1Johanne Fairchild
20 Mar 24 `* Re: on call by reference10Schol-R-LEA
20 Mar 24  +* Re: on call by reference5Schol-R-LEA
21 Mar 24  i`* Re: on call by reference4Chris Vine
21 Mar 24  i `* Re: on call by reference3Lawrence D'Oliveiro
22 Mar 24  i  `* Re: on call by reference2Chris Vine
22 Mar 24  i   `- Re: on call by reference1Lawrence D'Oliveiro
21 Mar 24  +* Re: on call by reference2Alan Bawden
21 Mar 24  i`- Re: on call by reference1Schol-R-LEA
21 Mar 24  `* Re: on call by reference2Lawrence D'Oliveiro
21 Mar 24   `- Re: on call by reference1Schol-R-LEA

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal