Closed stopachka closed 9 months ago
@stopachka good question.
We don't plan to introduce variables or functions into CEL; however, products on top of CEL are able to do so as long as they keep the following things in mind:
Assuming you feel comfortable with these statements and questions, and Firestore did because they added a lot of production safety controls on top of the language, then it's perfectly reasonable to introduce something like this in your own product; however, CEL can't introduce such functionality for all products because some products that use CEL are in very latency critical paths (more than 100M evaluations/s).
Understood, thanks for the detailed response @TristonianJones!
re: 4: mainly because it would be hard to sandbox and keep fast. Our use case is similar to firestore rules. Will look deeper into ideas!
Hey team, I know CEL was inspired by work with firestore rules. In firestore though, I notice it's possible to define ~functions.
From what I understood, these are not quite as powerful as real-world functions (they don't allow for recursion, and can only have one return. But, it is nevertheless quite handy.
I'm curious, is there a plan to support something like this in CEL?