This is the mail archive of the guile@sourceware.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]

forcing a getter for variable accesses


Is there any way currently to force access to a variable via a getter
procedure?  E.g., in Scwm we have user-configurable variables such as

*desk-width*

that we want people to access by using (optget *desk-width*) instead of
just *desk-width*.  In this case, the variable has a getter function:
(car (desk-size))

I'm looking for thoughts about how to force using the getter function
w/o requiring all accesses to be inside the `optget' macro.  I think
this is generally useful for guile, so if it's not already possible,
it'd be nice if we could make it possible.

The only thing I can think of is trying to use a reader extension and
rename all of our user variables to use hashes instead, e.g.,
#desk-width#.

Thanks,
Greg

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