Skip to content
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

Feature request: Some types are still aliases when they were newtypes in 0.28 #1436

Closed
poliorcetics opened this issue Jan 17, 2022 · 6 comments · Fixed by #1457
Closed

Feature request: Some types are still aliases when they were newtypes in 0.28 #1436

poliorcetics opened this issue Jan 17, 2022 · 6 comments · Fixed by #1457
Labels
enhancement New feature or request

Comments

@poliorcetics
Copy link
Contributor

Motivation

See #1393

Drawbacks

No response

Rationale and alternatives

No response

Additional context

I'm seeing

There may be others.

@poliorcetics poliorcetics added the enhancement New feature or request label Jan 17, 2022
@kennykerr
Copy link
Collaborator

kennykerr commented Jan 17, 2022

#1393/#1423 was concerned with handle types. These are all C-style enums. I'm less convinced these benefit greatly from being unique types at the expense of all the extra code gen required.

@poliorcetics
Copy link
Contributor Author

These are both i32s behind the scene and very easy to get wrong because of autocompletion or just using the wrong type.

Since we have windows-sys for "very raw" bindings, I think windows should be much more type-heavy. It would become a choice of compilation speed vs type safety, and I'm ready to lose seconds for the safety when I choose to use windows.

Other people may not have this opinion, have there been opposite opinions to this elsewhere ?

@kennykerr
Copy link
Collaborator

I'm getting this change ready.

@poliorcetics
Copy link
Contributor Author

Thank you very much, both for working on this and for your swift responses !

@kennykerr
Copy link
Collaborator

0.32.0 has now been published and includes this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants