This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Change to variable interface request


Maciej Stachowiak wrote:

> 
> In my opinion, it's a bad idea to expose the fact that Guile
> implements variables as pairs to the user level. I suspect this
> representation might change for certain classes of variables at least
> when it comes time to tune Guile for speed.
> 

The interface says nothing about the fact that variables are actually
two pairs.  All it says is to bind a variable to the pair.  The action
of variable-set! is then to modify the cdr of the pair.  How that is done
is not revealed. :) (Maybe I should be a lawyer).  In this case its trivial 
because the actual storage is a pair.  By creating this interface it becomes 
trivial to write evals (in Guile, not C) that work over association lists,
which is primarily what I need.  

Wade