Late Function Binding During Evaluation #1081
hyp0th3rmi4
started this conversation in
Ideas
Replies: 1 comment
-
@hyp0th3rmi4 This is a really important feature and I expect we'll implemented it in Q1 since we have some other projects which will rely on accumulated state through a side-channel, such as expression debugging or coverage instrumentation. The feature will require that a signature for the overload is provided to the runtime somehow which will indicate that the In terms of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This discussion is to revive a discussion in the following issue: #356, which essentially asks for the ability to binding functions at evaluation time rather than during parsing.
I have developed a solution, and I would like to discuss whether it is something that might be considered useful. The reason why I think this might be useful, is because we use google-cel in a business rules engine, which operates as a micro-service, and often we are asked to mutate per request some aspects.
One example would be to run business rules at a given time in the future, hence the need to override (per request) what is the value of the
now()
function defined in one of the libraries we use to compile the rules. Another use case is context based logging in the functions used for the evaluation.Based on my initial investigation, I think it is rather feasible and should not cause much trouble. The point where I got stuck was the ability to visit the interpretable so that bindings got replaced. While this is possible in the planner, the planning phase occurs at compilation time.
Any thoughts or interest in this matter?
Beta Was this translation helpful? Give feedback.
All reactions