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

newtype usage #215

Open
expipiplus1 opened this issue Nov 23, 2020 · 0 comments
Open

newtype usage #215

expipiplus1 opened this issue Nov 23, 2020 · 0 comments

Comments

@expipiplus1
Copy link
Owner

There are several places where vulkan is less strictly typed than it could be, some examples;

  • Bytestring -> ExtensionName
  • Bytestring -> LayerName
  • Word32 -> QueueFamilyIndex
  • ...

Some of this could be gleaned automatically from the spec (from the parameter name), however some amount of it would have to be manual.

The goal would be that, excluding places with manual type annotations, existing programs would still work.

The advantages are pretty clear, the drawback is that it would be getting a little further away from the spec as written, and incorrect (or missing) newtypes would be very confusing.

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

No branches or pull requests

1 participant