To type or not to type: a matter of logic
summary
Argues that function types correspond to logical implications and that writing implementations follows natural-deduction proofs: the compose signature (A->B, B->C) yields A->C by typing alone, Either.map follows a constructive dilemma pattern, and Semigroup[Function] matches conjunction/conditional product. Uses Scala, Cats-style algebraic types and a Sergey Benitsky Scala plugin for automated theorem-derived implementations. Claims the compiler proves many properties so unit tests are unnecessary for these cases and that type-driven development produces implementations by construction.
AI-written summary · about
