You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most providers also allow for flags to return some sort of value as well as a boolean.
How these values are typed can be problematic, as you have to be aware of the consistency of types and coercion across languages that are both strongly and weakly typed. How flag values are typed should be part of the spec, I feel.
There is a similar issue around user properties. Many providers allow for user properties/meta data to provide context to the flag engine. Again, how these values are typed needs to be considered.
It seems to me that many of the sampled vendors have type-specific methods/functions for some amount of type safety, and presumably to validate that the retrieved value is of the expected type. I believe @agentgonzo has some sensible opinions on this. I'll do some more research and respond here with some ideas.
Activity
toddbaert commentedon Mar 24, 2022
I agree that flag value typing should be defined in the spec, and that we need to do our best to come up with a cross-language solution for this problem. Somewhat relevant to this discussion is the recently merged doc here: https://github.com/open-feature/spec/blob/main/research/api-comparision.md#types
It seems to me that many of the sampled vendors have type-specific methods/functions for some amount of type safety, and presumably to validate that the retrieved value is of the expected type. I believe @agentgonzo has some sensible opinions on this. I'll do some more research and respond here with some ideas.
beeme1mr commentedon Mar 25, 2022
I'll close this issue now that we have a proposal in place. @dabeeeenster your feedback on @toddbaert's proposal would be very much appreciated.