The author argues that Compile-Time Type Information (CTTI), often touted as 'zero-cost,' actually imposes exponential costs during semantic checking, code generation, and binary size, whereas Runtime Type Information (RTTI) is linear and effectively free during semantic analysis. The article challenges the common assumption that known-at-compile-time equates to free-to-enumerate, using Odin's design choices as a reference point.
Background
The article discusses a core design decision in systems programming languages: whether to use compile-time or runtime type information for features like type dispatch and formatted printing. Odin, a systems programming language, chose RTTI over CTTI for certain features.
- Source
- Lobsters
- Published
- Sep 3, 2026 at 05:35 AM
- Score
- 7.0 / 10