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] |
humeniuw@cadvision.com writes: > 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. > Well, viewed that way, I don't think Jim likes the idea of variables with magic side effects, and I'd have to add that allowing only one kind of magic side effect (mutating a cons cell) is worse, if anything, than not allowing them at all. - Maciej