[Top][All Lists]
[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: |
Sam Tregar |
Subject: |
Re: Gurus? Care to re-explain the absense of gh_set_x() for me? |
Date: |
Fri, 13 Jul 2001 12:18:17 -0400 (EDT) |
On Fri, 13 Jul 2001, Matthias Koeppe wrote:
> Have I understood you correctly: You have Perl variables, $foo and
> $bar say, each of which hold one SCM object. For instance, $foo holds
> an SCM representing the integer 1, and $bar holds an SCM representing
> 2. Now you do $foo += $bar, and you expect $foo to hold a SCM
> representing the integer 3?
Exactly. And whatever might have been pointing to the SCM for $foo should
see the new value. That won't happen if I:
$foo = scm_add($foo, $bar);
> You need to pass the *location* of FOO in some way. I seem to have
> understood that FOO and BAR aren't actually Scheme variables (whether
> local or global) but "boxes" with SCM content that reside on the Perl
> side; so my original macro suggestion doesn't help.
Right. You can think of them as an "SCM *" with a bit of extra magic
thrown in.
> You should simply reify your boxes on the Scheme side and provide
> functions like (BOX-REF BOX) and (BOX-SET! BOX VALUE) in order to
> access them.
Interesting proposal. It would solve the problem but at a pretty high
cost in terms of transparency of use. Ultimately I'd like to have a
system that makes using Perl and Guile together almost seamless.
At least for now I'll probably just put a big warning in my docs about
mutating operaters (+= -= /= *= ++ --) and how they won't maintain links
in the Guile variable space.
Thanks!
-sam
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, (continued)
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Miroslav Silovic, 2001/07/15
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Matthias Koeppe, 2001/07/13
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Sam Tregar, 2001/07/13
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Brett Viren, 2001/07/13
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Sam Tregar, 2001/07/13
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, tom, 2001/07/13
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Matthias Koeppe, 2001/07/13
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?,
Sam Tregar <=
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Matthias Koeppe, 2001/07/13
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Sam Tregar, 2001/07/13
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Klaus Schilling, 2001/07/13
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Alex Shinn, 2001/07/13
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, rm, 2001/07/14
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Alex Shinn, 2001/07/14
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Thomas Bushnell, BSG, 2001/07/13
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Thien-Thi Nguyen, 2001/07/14
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Martin Grabmueller, 2001/07/14
- Guile At Work (was Re: Gurus? Care to re-explain the absense of gh_set_x() for me?), Evan Prodromou, 2001/07/14