chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] basic Scheme question


From: Drake Wilson
Subject: Re: [Chicken-users] basic Scheme question
Date: Fri, 24 Oct 2008 03:00:45 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

Quoth Shawn Rutledge <address@hidden>, on 2008-10-23 23:54:03 -0700:
> > Eval only sees the top-level environment.  It may be possible to use
> > the environments egg to construct your own environment containing v.
> 
> I thought of that, but also thought there must be a generic Scheme way
> to do this.

>From someone with admittedly limited Scheme knowledge:

The generic Scheme way wouldn't involve passing around quoted names and
expecting them to retain their associations to the original lexical symbols
at runtime, because they generally don't.

The generic Scheme way would probably be to have a function encapsulate the
idea of reading and writing the variable inside a "location" structure of
some sort (pair of get+set function, likely) and then have the other function
interact with that.

   ---> Drake Wilson




reply via email to

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