Static vs. Dynamic Type Checking¶
The fundamental trade-off is WHEN type errors are detected: at compile time (fail fast, before deployment) or at runtime (fail late, but with full dynamic information).
Tension Addressed¶
Safety vs. Flexibility; Compile-time vs. Runtime Checking
Recognizable As¶
Languages requiring type declarations vs. those inferring types at runtime; compilation errors vs. "TypeError" at runtime; the debate around "scripting languages" vs. "systems languages"
Canonical Sources¶
Pierce, Types and Programming Languages (2002); Cardelli, "Type Systems" (1996); Bracha, "Pluggable Type Systems" (2004)
Transfers To¶
Configuration validation (schemas vs. flexible configs), API design (strict contracts vs. tolerant readers), data pipelines (schema enforcement vs. schema-on-read)
This dichotomy represents a fundamental design decision, not a quality judgment. Static typing trades development-time flexibility for deployment-time confidence. Dynamic typing trades early error detection for rapid iteration. Most modern systems blend both through gradual typing, type inference, or multi-language architectures.
Related Concepts¶
- Type Inference - Type Systems & Memory