-
Notifications
You must be signed in to change notification settings - Fork 23
revisit the QueryResult interface #134
Comments
This would require the user to cast a |
Yes, but because each interface method is specific to the type, we're effectively doing that anyway. For example, we're only using Again, this is not high priority because it works, but I wanted to make a note that I think that it could be simplified. |
We don't do a type check, but we use the I think we will be able to change our our implementation in the future without breaking user code when we need to. |
Can we close this? |
I believe this still applies. It has been iceboxed because it's not a priority, but I think it's still worth reconsidering the way this is handled at some point. |
We may be able to simplify the
QueryResult
interface.Because each function is specific to the type, it's effectively an empty interface. And every implementation is left with unused methods:
I could see it being something like this instead:
In this case the
QueryResult
inside theBitmapResult
is not really necessary because everything implements the empty interface, but if for some reasonQueryResult
needs to have a function defined, this would ensureBitmapResult
implements the interface.This is not at all a high priority, but may be worth revisiting at some point.
The text was updated successfully, but these errors were encountered: