-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type-system relationship between HasRaw*Handle
and Has*Handle
traits
#135
Comments
Raw*Handle
and *Handle
traitsHasRaw*Handle
and Has*Handle
traits
Related: What is the value even in having two traits? Is it just that way because we're yet unsure of the design? I think it'd make sense to combine them into a single |
This change would make the semver trick hard to do... but #136 would already make it impossible so why not just go full ham? I've often compared the difference between I would be in favor of just merging the traits. |
I think the semver trick is basically already impossible, see #125 (comment). |
After reading #135, I've realized that the HasRawDisplayHandle and HasRawWindowHandle traits have little value in a post-borrowed-handle world. Borrowed handles do everything better, and the raw handle can be extracted from the borrowed handle. Therefore it makes sense to remove these traits. Closes #135. Signed-off-by: John Nunley <[email protected]>
After reading #135, I've realized that the HasRawDisplayHandle and HasRawWindowHandle traits have little value in a post-borrowed-handle world. Borrowed handles do everything better, and the raw handle can be extracted from the borrowed handle. Therefore it makes sense to remove these traits. Closes #135. Signed-off-by: John Nunley <[email protected]>
After reading #135, I've realized that the HasRawDisplayHandle and HasRawWindowHandle traits have little value in a post-borrowed-handle world. Borrowed handles do everything better, and the raw handle can be extracted from the borrowed handle. Therefore it makes sense to remove these traits. Closes #135. Signed-off-by: John Nunley <[email protected]>
After reading #135, I've realized that the HasRawDisplayHandle and HasRawWindowHandle traits have little value in a post-borrowed-handle world. Borrowed handles do everything better, and the raw handle can be extracted from the borrowed handle. Therefore it makes sense to remove these traits. Thus far I've deprecated them instead of removing them, in order to be more kind to downstream crates. Closes #135. Signed-off-by: John Nunley <[email protected]>
Should there be a type-system relationship between these?
I think it would make sense to make the normal handles subtraits of the raw handles, i.e.
trait HasWindowHandle: HasRawWindowHandle { ... }
?Or maybe we should do a blanket
impl<T: HasWindowHandle> for HasRawWindowHandle {}
, or vice-versa?The text was updated successfully, but these errors were encountered: