Having to send a time into the function for constraints is a design failure.
This should just be handled by sending in a closure f(x) = f(x, t, ...).
So t should be a global variable then?
No, t can be a local variable and you send in the closure x -> f(x, t). Just like always when you need to pass parameters.
But we give the function only once, when creating the condition.
Yeah but you can change t afterward. Perhaps that's what you meant.
TIL
Another proposal: Let user define f(x, args...; kwargs...) -> value and then call update!(ch, args...; kwargs...) as appropriate. update! would then splice in the x as f(x, args...; kwargs...).
Maybe a NamedTuple is appropriate? User defines f(x, nt) -> value and call update!(ch, nt).
Maybe, but I wonder if not just propagating args...; kwargs... (like you have in the PR I think) is easier in that case.