hi Arne!
Thanks for your reply!

>
>
> > BTW. In my case, I want to implement the global var mutation. For such a
> > case, if users don't want to put #:declarative? to affect the whole
> > downstream modules, maybe the best way is to implement getter and setter
> > inside the global var module.
>
> I think that when we have to implement getters and setters for this,
> that’s an indication of a design problem.
>

"design problem" is an easy word. ;-)

Although I mostly put global var like global parameters in such a module, I
think there's always something that needs a globally setter.
The parameter works when you could get the state first in the runtime,
then you can bind it with pameterize. But for the case that you have to
call another function first, then check the state change or not, the easier
way is to take advantage of side-effects.

Best regards.

Reply via email to