Constant Time
summary
Explains concrete tricks: constant expressions compute machine word size at compile time, shows how to make standard file descriptor values truly immutable by using typed constants, and demonstrates replacing sentinel error variables with constant string‑derived error types so they become constant error values are fungible and compare equal. Provides a small patchable example that compiles everywhere except one standard‑library client when swapped, proving the approach works and is adoptable in user code.
AI-written summary · about
chapters (9)
- 0:00Start
- 1:56Declare a Constant
- 3:15Constant Expression
- 5:58Singleton Pattern
- 7:03File Descriptors
- 9:31Sentinel Error Values
- 12:17Most Important Property of a Constant
- 14:21Error Implementation
- 16:09Ghost Constants








