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

Enhance in memory ContextEvaluator interface #1349

Open
wxue-apple opened this issue Feb 26, 2025 · 1 comment
Open

Enhance in memory ContextEvaluator interface #1349

wxue-apple opened this issue Feb 26, 2025 · 1 comment

Comments

@wxue-apple
Copy link

Hello new to open feature sdk, wondering if a generic type should be part of the Flag parameter as well.

from

/**
 * Context evaluator - use for resolving flag according to evaluation context, for handling targeting.
 *
 * @param <T> expected value type
 */
public interface ContextEvaluator<T> {

    T evaluate(Flag flag, EvaluationContext evaluationContext);
}

to

/**
 * Context evaluator - use for resolving flag according to evaluation context, for handling targeting.
 *
 * @param <T> expected value type
 */
public interface ContextEvaluator<T> {

    T evaluate(Flag<T> flag, EvaluationContext evaluationContext);
}
@aepfli
Copy link
Member

aepfli commented Feb 26, 2025

I understand your suggestion, but merely to have a type there might not be a good reasoning. hence i am asking, why would we need it, what do you think we can achieve with it. and what topic can we improve with this change?

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

No branches or pull requests

2 participants