-
Notifications
You must be signed in to change notification settings - Fork 74
Add const generics 2025h2 goal #313
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Const Generics | ||
|
||
| Metadata | | | ||
|:-----------------|-------------| | ||
| Point of contact | @BoxyUwU | | ||
| Teams | lang | | ||
| Task owners | @BoxyUwU | | ||
nikomatsakis marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Status | Proposed | | ||
| Tracking issue | | | ||
| Zulip channel | N/A | | ||
|
||
## Summary | ||
|
||
Work towards stabilizing the remaining const generics functionality that was left out of the original `min_const_generics` feature. | ||
|
||
## Motivation & Status Quo | ||
|
||
The `min_const_generics` feature was stabilized with a number of limitations, while some have since been lifted there are still some things we do not support: | ||
- Inferred arguments to const parameters (`feature(generic_arg_infer)`) | ||
- Const parameters with arbitrary user-defined types (`feature(adt_const_params)`) | ||
- Non-concrete uses of associated constants in the type system (`feature(min_generic_const_args)`/`feature(associated_const_equality)`) | ||
|
||
When using const generics it is common to run into these limitations and be unable to move forwards, having to rewrite your code to use workarounds or not use const generics at all. This is a poor user experience and makes the language feel incomplete. | ||
|
||
### The next 6 months | ||
|
||
- Write a document outlining the main design decisions of `adt_const_params` and discuss it with the lang team, follow up with an RFC | ||
- Finish implementing the `min_generic_const_args` (mgca) feature prototype | ||
|
||
### The "shiny future" we are working towards | ||
|
||
All parts of the const generics feature that were left out of the minimum stabilization have now been stabilized. Users do not encounter "functionality cliffs" where const generics | ||
suddenly stops working as well as type generics, forcing code to be rewritten to work around language limitations. | ||
|
||
## Ownership and team asks | ||
|
||
| Task | Owner(s) or team(s) | Notes | | ||
|-----------------------------------|---------------------|-------| | ||
| `adt_const_params` design meeting | [lang] | | | ||
|
||
| `adt_const_params` RFC draft | @BoxyUwU | | | ||
| Finish `mgca` prototype | @BoxyUwU @camelid | | |
Uh oh!
There was an error while loading. Please reload this page.