mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 19:10:14 +01:00
Proposal [p5337](https://docs.carbon-lang.dev/proposals/p5337.html) renamed and introduced new syntax for extending an interface or named constraint with another. - The `require` keyword can now be modified by `extend`, instead of it being a separate thing altogether. - Interfaces can `extend impl as I` to gain the members of `I` and implicitly use them to implement `I`. Named constraints can not. The `Identity` example is meant to not know anything about the type of the object its passing through, but it ends up making a copy of it. Fix the example to not by using a pointer.
Generics
This directory contains the collection of documents describing the generics feature of Carbon:
- Overview - A high-level description of the generics design, with pointers to other design documents that dive deeper into individual topics
- Goals - The motivation and principles guiding the design direction
- Terminology - A glossary establishing common terminology for describing the design
- Detailed design - In-depth description
- Appendix: Coherence - Describes the rationale for Carbon's choice to have coherent generics, and the alternatives.
- Appendix: Rewrite constraints - Describes the detailed rules governing rewrite constraints, and why resolving them terminates.
- Appendix: Witness tables - Describes an implementation strategy for checked generics, and Carbon's rationale for only using it for dynamic dispatch.