Deutsch   English   Français   Italiano  
<877chyiosp.fsf@tudado.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Johanne Fairchild <jfairchild@tudado.org>
Newsgroups: comp.lang.scheme
Subject: on call by reference
Date: Tue, 19 Mar 2024 05:55:18 -0300
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <877chyiosp.fsf@tudado.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="7aff4695c44eee6d3b97efe88388cf90";
	logging-data="789655"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/ogeuwfqPHKn2JSoUb1BrOQOx3oZ7nRoo="
Cancel-Lock: sha1:UFlkggncdIVlg4oCH9A9GMy7GAc=
	sha1:AikMMpM+MVxIUSVNSH2xsNP1WmY=
Bytes: 2188

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.