Hello Operator: Making The Call for C
summary
Proposal to add C operators by decoupling an explicit operator-to-function binding (operator declarations that map to normal C functions) and using exact type matching instead of C++ overload resolution. Syntax sketch uses underscore-capital Operator declarations bound to named functions; large-value types use pointer-based versions to avoid copies. Works for plain value types like vec3/vec2 and keeps no name-mangling, but temporary-producing expressions still leak without RAII/destructors and implicit conversions are intentionally disallowed.
AI-written summary · about
chapters (30)
- 0:00Introduction to C committee
- 1:42Designing for constraints
- 3:14The debate over operators
- 4:46Genuine appeal of operators
- 7:15Existing operators in C
- 9:35Functional vs operator syntax
- 10:59Roadmap for the proposal
- 11:59C++ operator overloading
- 13:44Name and argument lookup
- 16:37Operators in C
- 19:15Overload resolution
- 21:26Name mangling
- 22:49Name mangling and ffi
- 26:11N3051 and N3201 proposals
- 27:50Proposed solution for C
- 29:47Syntax demonstration
- 32:45Middle ground for C
- 35:37Implicit conversions
- 38:36Exact type matching
- 40:50C2Y generic feature
- 42:30Integer promotion
- 45:49RAII and destructors
- 47:20Memory leaks in C
- 50:57Handling RAII
- 52:03Hidden blessing of constraints
- 53:28References and pointers
- 55:33Pointer operators
- 57:03Proposed design review
- 58:47Solving the tension
- 59:26Q&A
related talks
51mC++ Features You Might Not Know
53mC++ Features You Might Not Know
04mThe Glory of Six Dots
43mC++: All the flavours of operators new and delete
54mTypical C++, But Why?
01h 19mThis is C++: Uncompromised Performance, Undefined Behavior, & Move Semantics
01h 04mA Preview of C++ 23
01h 19mSpecial Member Functions in C++
