Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow extension of stdlib functions #747

Merged
merged 1 commit into from
Jun 16, 2023

Conversation

TristonianJones
Copy link
Collaborator

@TristonianJones TristonianJones commented Jun 16, 2023

Publish the stdlib.Functions() directly to enable extension of most of the standard library.

Operators such as +, -, ==, etc. do not support extension as they are marked as singleton
implementations; however, most human-readable overloads such as contains support extension.

Rather than split the stdlib into an cel.EnvOption for a set of declarations and a cel.ProgramOption
for a set of function implementations, the library has been published as a set of decls.FunctionDecl
instances which support merging an dynamic dispatch with type-safety.

Closes #493

@TristonianJones TristonianJones merged commit a0aba64 into google:master Jun 16, 2023
@TristonianJones TristonianJones deleted the stdlib-direct branch June 16, 2023 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support non-overlapping overload dispatch using function
2 participants