Skip to content

Files

Latest commit

Apr 22, 2025
b477797 · Apr 22, 2025

History

History

generics

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 3, 2023
Aug 24, 2024
May 16, 2024
Sep 23, 2023
Apr 22, 2025
Mar 22, 2024
Aug 15, 2023
Sep 23, 2023

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.