Use Site Checking Considered Harmful
summary
Argues that use-site checking—deferring generic type checks until concrete instantiation—pushes errors to call sites, breaks local reasoning, and lets hidden or stealthy requirements slip past until surprising failures occur. Uses a concrete mean example and C++ templates to show errors reported far from their origin, describes “type imposture” where incidental operators satisfy constraints, and compares alternatives: add template-expansion debugging or adopt richer declaration-site type systems (Swift/Scala/Haskell-style protocols/traits) so generic code is checked at definition time.
AI-written summary · about
