This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
forcing a getter for variable accesses
- To: guile@sourceware.cygnus.com
- Subject: forcing a getter for variable accesses
- From: Greg Badros <gjb@cs.washington.edu>
- Date: 08 Sep 1999 11:06:30 -0700
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