Get the latest tech news

The Big Oops in type systems: This problem extends to FP as well


Systems: This Problem Extends to FP as Well Building on Casey Muratori's critique (youtube) of "compile time hierarchies that match the domain model," this problem extends beyond OOP to encompass a broader pattern in static type systems, particularly functional programming approaches that attempt to "make illegal states unrepresentable." Type systems are often ranked in a "correctness hierarchy", with Idris/Haskell at the top, Java/C# in the middle, Python/JavaScript at the bottom. Static type proponents argue that better type systems can capture domain models more accurately, reducing the need for tests by proving certain software properties impossible.

Building on Casey Muratori's critique ( youtube) of "compile time hierarchies that match the domain model," this problem extends beyond OOP to encompass a broader pattern in static type systems, particularly functional programming approaches that attempt to "make illegal states unrepresentable." Domain experts can't recognize their mental models in rigid algebraic structures, and developers get trapped maintaining complex type hierarchies that resist change. Treating data as immutable facts and designing transformation pipelines sidesteps the minigame of creating type structures that are simultaneously flexible enough for change and rigid enough to prevent errors.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of problem

problem

Photo of Type Systems

Type Systems

Photo of Big Oops

Big Oops

Related news:

News photo

Problem solving using Markov chains (2007) [pdf]

News photo

Online Safety Act exacerbates publishers’ ‘dark traffic’ problem

News photo

Problem Solving Is Often a Matter of Cooking Up an Appropriate Markov Chain