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

Add draft RFC for effect-generic types #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

yoshuawuyts
Copy link
Member

Adds a draft RFC for effect-generic types. This is the third in the series, and builds on the previous drafts for effect-generic trait declarations, and effect-generic bounds and functions.

The desugaring portion of this RFC on filing will be out of date. This still uses the older const-bool approach, which has since been replaced with the more potent const-enum approach in the compiler. We need to redraft the desugaring portions of all RFCs to make use of this new system, but we probably want to wait until Oli is back from PTO to do that. Even still tho: the desugaring in this RFC should still be sound, even if not ideal.

Thanks!

@clarfonthey
Copy link

One small nit, but I don't think we should use the cfg attribute for omitting fields here, since it would be a rather unprecedented way to use it-- it implies cfg(effect = effect) is just a flag that can be checked throughout the program which is not the case. Perhaps a when(effect = effect) and unless(effect = effect) might be better.

@yoshuawuyts
Copy link
Member Author

Okay, yeah for sure we can change that to something different. You raise a good point that cfg already means: "compile time evaluated" and so it makes sense not to change that meaning.

when as a bound seems nice enough; happy to go with that in the draft. Thank you for raising this!

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

Successfully merging this pull request may close these issues.

2 participants