You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As pointed by @mechkg, we can drop covariance and obtain a more type-safe interface as a result.
Do we want to keep covariance? I'm tempted to drop it both for the sake of simplification and for better type safety of the graph transformation interface.
It is an very interesting design choice to discuss upon and decide. I find no compelling reason for graph to be invariant although as you mentioned it can be done for simplification. Here Daniel's answer gives idea why set is invariant and this thread gives more insights about the design decision.
@adithyaselv Thanks! Yes, after reading various discussions, including the ones you link, I guess we can live with slightly less elegant code for the sake of having covariance, which seems to be expected by default.
As pointed by @mechkg, we can drop covariance and obtain a more type-safe interface as a result.
Do we want to keep covariance? I'm tempted to drop it both for the sake of simplification and for better type safety of the graph transformation interface.
As a comparison,
List
is covariant, whereasSet
is not.The text was updated successfully, but these errors were encountered: