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
Currently, there are a lot of generic and associated types mixed in our traits, as @clangenb once pointed out (forgot where that was though).
Current logic: Return types are associated, input types are generic. Nothing wrong with that, but there's one drawback though: Generics are more verbose, which makes #500 more difficult than it needs to be.
Because most traits do not need to be generic (I don't see the use case of multiple implementations for different Hash types for example), I propose to make them associated instead of generic.
Currently, there are a lot of generic and associated types mixed in our traits, as @clangenb once pointed out (forgot where that was though).
Current logic: Return types are associated, input types are generic. Nothing wrong with that, but there's one drawback though: Generics are more verbose, which makes #500 more difficult than it needs to be.
Because most traits do not need to be generic (I don't see the use case of multiple implementations for different Hash types for example), I propose to make them associated instead of generic.
Good explanation on associated / generic difference: https://blog.thomasheartman.com/posts/on-generics-and-associated-types/
The text was updated successfully, but these errors were encountered: