Closed typeless closed 4 years ago
Regarding the problem of why I design the comparator this way, I expected that the comparators just have to be converted to function pointers (from string constants). But it turned out that the behavior of the In
operator can not be generalized with the rest of the comparators. As a result, all I can think of is to have a flag (the mode
field) to specialize the behavior of Compare
for In
. Otherwise, I would have to use an ugly reflection hack to determine the difference.
This is very similar to my, unfortunately still open, PR #99.
Agreed, I'm closing this issue in favour of #99. In any case, thank you very much for your time!
Note that I am not very satisfied with the API design and propagated changes of the PR, especially about the way of how to specify a new comparator. But it does provide what I need for my immediate use-case.