Re: "Magic" Variables?

Mikael Djurfeldt (mdj@nada.kth.se)
18 Oct 1997 23:55:20 +0200

Maciej Stachowiak <mstachow@mit.edu> writes:

> Is there any way in Guile to have special code executed whenever a
> particular variable is set? I'm pretty sure there isn't, but I wanted
> to make sure.

There isn't.

> Such a thing would be useful for avoiding a lot of ad-hoc setter
> procedures in guile-based configuration languages where some immediate
> effect should take place when certain options are set,

This (the active variables) feels like an unschemey way of solving the
problem. Jim Blandy once suggested:

(icon-font font12)

to set the parameter `icon-font' and

(icon-font)

to get its value.

Best regards,
/mdj