[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 13:25:46 -0400 (EDT)

On Fri, 13 Jul 2001, Matthias Koeppe wrote:

> I don't think there is a high "cost in terms of transparency" here.
> In fact, it would be very non-Schemey (thus non-transparent to Scheme
> users) to have variables with an unusual (in this case, Perl-like)
> semantics.

Well, it might be non-Schemey but it would be quite Perlian.  I imagine
most of my users will be Perl programmers first and Schemers second.
Would any Scheme users actually program anything in Perl?  I can almost
imagine Python, but Perl?

> If you like, you could also introduce a SRFI-19-style
> getter-with-setter like this:
>  (define perl-value (getter-with-setter box-ref box-set!))
> Then you could do (PERL-VALUE BOX) to get the value and (SET!
> (PERL-VALUE BOX) VALUE) to set it.  This also enables the use of
> mutating macros like INCREMENT! that work both with normal Scheme
> variables and your Perl boxes:

Interesting.  This is definitely an idea to pursue.  I'm not sure how this
relates to the problem of dealing with Guile SCMs from Perl, but perhaps
that will become clearer with more investigation.  This seems to more
obviously relate to what happens to Perl values when they enter Guile.

> You may also want to have a look at the Guile Emacs project
> (  They are posed with pretty much the
> same problem as you are; they have to access Emacs Lisp variables from
> Guile.

Will do.


reply via email to

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