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

Proposal: Make all struct chains mutable, instead of having separate in/out/inout chain types #395

Open
kainino0x opened this issue Nov 9, 2024 · 1 comment
Labels
!discuss Needs discussion (at meeting or online) extensibility Adding features without breaking API changes

Comments

@kainino0x
Copy link
Collaborator

kainino0x commented Nov 9, 2024

It doesn't seem like we get much value from const in these struct chains, and it introduces some complexity - every chained struct needs to match the mutability of its root struct, which means they can't be mixed. Right now we have "in", "out", and "inout" (#260) struct chains; we could imagine a situation where we need to attach a new "inout" non-root struct to an "in" struct but can't, and it becomes kludgy.

Doing this would obsolete #376, and allow us to defer the decision from #261 about whether to mix inputs and outputs in the same struct chain (also potentially reducing the number of version 2s of APIs we need if we don't do #216 right now). Loosely affects #264 as well, see there.

@kainino0x kainino0x added !discuss Needs discussion (at meeting or online) extensibility Adding features without breaking API changes labels Nov 9, 2024
@kainino0x
Copy link
Collaborator Author

WGPUFutureWaitInfo is already a sort of in-out struct (but not extensible) - future goes in, completed comes out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
!discuss Needs discussion (at meeting or online) extensibility Adding features without breaking API changes
Projects
None yet
Development

No branches or pull requests

1 participant