-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
I'm not sure how scientist handle this (nor how ruby handles this situation), and I know you want to stay close to the ruby lib, but it could be useful to support different return types between the control and candidate. When refactoring there is no guarantee that the candidate methods will return the same type as the existing method, which could lead to hardships trying to experiment on them. Supporting 2 different types allows us to get around that issue, and we can check the differences between 2 different complex objects in the comparison.
A potential implementation:
internal class Experiment<TControl, TCandidate>
{
Func<Task<TControl>> _control;
Func<Task<TCandidate>> _candidate;
public void Use(Func<Task<TControl>> control);
public void Try(Func<Task<TCandidate>> candidate);
public void Compare(Func<TControl, TCandidate, bool> comparison);
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels