Overview
This course explores the concept of Definition-Checked Generics in programming languages, focusing on its importance, comparison to existing approaches like C++20 templates and concepts, and the advantages it offers. The learning outcomes include understanding how C++20 concepts work, exploring different approaches in languages like Swift, Rust, and Carbon, and delving into the challenges of implementing a definition-checked generics system. The course covers topics such as generic programming, type erasure, constraints, and interface parameters. The teaching method involves working through examples and discussing existing approaches in various languages. This course is intended for programmers interested in advanced C++ concepts, generic programming, and language design.
Syllabus
Introduction
DefinitionChecked Generics
DefinitionChecking in C
Why is it important
C error messages
Is static typing useful
Shifting left
Type Erasure
Checked Generics in Practice
C Templates Concepts
Generic Functions
Constraints
Interface Parameters
Type Parameters
Implementation Parameters
Checked Generics in Other Languages
C
Swift
Protocols
Generic Function
Generic Variatics
Rust Traits
Rust Advanced Features
Rust Periodics
Interfaces
Checked vs Template
Chandler Carruth
Examples
Taught by
CppNow