-
Notifications
You must be signed in to change notification settings - Fork 914
Closed
Milestone
Description
Currently, we're allowing Compare with T being any kind of class.
Should we introduce an IDiffResult interface with from which the classes we support as convertible from DiffSafeHandle? Then Diff.Compare<T> would be T : IDiffResult.
This would improve a few aspects:
- No more runtime issues like this
- Type-safe and semantic completion support! I always had to check the sources for the types I can get.
- Customizable from user-side.
- No need to manually maintain the list (which is also outdated) in the exception message and the transformation list.
I know this would bring an implication that DiffSafeHandle would become public, or we can expose a proxy class with methods which interface the native methods.
Metadata
Metadata
Assignees
Labels
No labels