Generic Arity: Definition-Checked Variadics in Carbon - Lecture
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only! Grab it Explore an innovative approach to modeling variadic functions in the type system during this conference talk from C++Now 2024. Dive into the proposed design for variadic functions in Carbon, an experimental C++ successor language, which treats them as strongly typed functions generic over their arity. Learn how Carbon aims to enable definition-checking of variadic functions, allowing for complete type-checking of the function body using only the declared type constraints. Discover solutions to challenges such as representing types with variadic components, type-checking function calls with unknown argument-parameter correspondence, and balancing syntax for successful definition checking. Gain insights into Carbon's strategy for avoiding the quadratic overhead often associated with C++'s recursion-oriented variadics model while maintaining expressive power. No prior knowledge of Carbon is required, as relevant language aspects will be introduced during the presentation.