mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 10:31:04 +01:00
This proposal:
- Adds support for interfaces requiring other types than `Self` to implement interfaces, as in:
```
interface IntLike {
impl i32 as As(Self);
// ...
}
```
- Defines requirements on how to satisfy those requirements that have a `where` clause.
- Extends `observe` declarations to include saying a type implements an interface, so code can provide a proof instead of the compiler having to perform a recursive search.
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
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