r/programming • • 15d ago

Lean explained with TypeScript

https://gruhn.me/blog/2026-08-29/
30 Upvotes

2 comments sorted by

2

u/adriano-1370 12d ago

The analogy is useful, but the key boundary is proof checking: Lean's kernel checks proof terms against propositions; TypeScript's type checker does not provide that kind of proof guarantee.

1

u/saastryde 7d ago

I've started using discriminated unions for React props in my SaaS stack to catch these kinds of runtime errors early. It saved me a headache last week when a missing field was causing silent failures.