-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Proposal: Listing all possible values of a type #199
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
Conversation
Partly, #114 seems to have stalled and I thought the feature deserved a nudge. The two proposals are quite similar, but they do differ in minor but significant ways:
In general, this proposal is more focused on defining the meaning of the I prefer my approach because I think the more specific semantics will serve us well in the future, but both of them will get us to similar places. |
I'd be happy to discuss this further and update #114 if we can come up with something better. Please feel free to bring this up again on the mailing lists. I might not have enough time to contribute anything to the discussion in the next week or two, but I'll get back to it eventually. |
@jtbandes Let me know when you're a little less busy and I'll post something on the list. (Or just post it yourself.) |
Re. 2: I'm happy to adopt your explanations of the semantic meaning, although we should think carefully about the wording, specifically usage of "must", if we're allowing users to write their own implementations (i.e. if Re. 4: I'm happy to adjust the wording to clarify that derivations not covered by the proposal are implementation-defined, but I'm skeptical that significant changes could be made without going through the evolution process. Re. 5: That's a fairly minor point. I think we could combine them and offer both, or just drop the "future directions". Re. the rest: I'm drafting an email to swift-evolution so we can keep discussing and hopefully come to some conclusions in the near future. I'll gladly share the draft with you, and I think it'll make sense to have both our names as co-authors on the proposal. |
This is a proposal for the long-discussed, frequently-requested, never-reviewed "give us a way to get all enum cases" feature.