guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gurus? Care to re-explain the absense of gh_set_x() for me?


From: Eric E Moore
Subject: Re: Gurus? Care to re-explain the absense of gh_set_x() for me?
Date: 13 Jul 2001 18:39:58 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Sam" == Sam Tregar <address@hidden> writes:

Sam> On 13 Jul 2001, Alex Shinn wrote:
>> Hmmm... not sure what the implications of directly changing the SCM
>> struct contents would be, and whether this might break things in
>> Guile.

Sam> This is roughly what I was expecting the non-existent gh_set_x()
Sam> to do - change the value stored in an SCM without otherwise
Sam> disturbing its identity.

Except, of course, that this is not what set! does :)

(define (foo x)
  (set! x 3)
   x)

does not alter the object (SCM) bound to l.  It changes what object
(SCM) l is bound to.  

If it changed the SCM, this would (badly) break the whole notion of
call by value.  Or at least the way guile implements it.

  -Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]