mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 19:40:10 +01:00
Use the keyword `impls` instead of `is` when writing a `where` constraint that a type variable needs to implement an interface or named constraint. What was previously (provisionally) written: ``` fn Sort[T:! Container where .ElementType is Ordered](x: T*); ``` will now be written: ``` fn Sort[T:! Container where .ElementType impls Ordered](x: T*); ``` --------- Co-authored-by: Geoff Romer <gromer@google.com> Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
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 of how generic type parameters work.
Rejected alternatives- not implemented yet