I am trying out
l3keys for the first time and I am encountering the following issue. I have some boolean keys (true/false). For them it looks nice to use
.bool_set:N so that I can get automatic validation of the value passed into the key and I also get the key value nicely stored in a boolean variable for later inspection.
At the same time, I would like to execute some code right after the variable is set. However, it looks like
bool_set:N cannot be used together on the same key, because the one that comes later substitutes the action of the first. In practice, there seems to be no possibility to run a hook triggered by the variable setting action.
Obviously, there are several possible workarounds:
run some code after every
However, this means that such code needs to check for every possible variable being set to see if it has changed and take action accordingly. If you have say 30 variables, this means checking all of them, when maybe only one of them is being changed. Having a hook invoked just for the variable that has been set seems more appropriate as long as the variables do not interact one with the other.
.code:ninstead of the variable setting actions.
However, this means redoing the parsing and validation of the value.
Because all the workarounds seem to have inefficiencies of their own, I wonder if I am missing something... Any help is appreciated!