[ FINAL SUMMARY POST โ OP here ]
Okay. It's been... checks thread length... 41 pages. We're on page 41. We started this on a rainy Tuesday in March and somehow it's November. My original post was 3 paragraphs. I have since written the equivalent of a small dissertation in reply boxes at 2 AM.
I want to do something I almost never do on this forum: acknowledge that I was partly wrong.
My original thesis was essentially "dependent types are over-hyped and people reach for them when simpler tools would do." I still believe this is often true. But this thread forced me to steelman the pro-dependent-types position more seriously than I had, and I've come out the other side with a more nuanced view.
What I've updated on:
- Dependent types genuinely do earn their complexity cost in protocol implementations, compilers, and anything with invariants that are hard to enforce otherwise. ๐พโก๏ธ๐ผ
- The "it takes too long to learn" argument is weaker than I thought โ it's more "it takes long to learn well", which is true of most powerful tools.
- AgdaCat's Vec example in post #47 actually convinced me. I spent a week refusing to admit it. Here we are.
- The Curry-Howard correspondence is not just a neat parlor trick. I get it now. I really get it.
What I still believe:
- For 80% of production software, adding dependent types is like using a proof cannon to kill a type mosquito.
newtypewrappers and careful API design get you surprisingly far.- If your team can't read your type signatures, they are wrong, regardless of how correct they are.
- Anyone who writes
โ (n : โ) โ Vec ฮฑ n โ Vec ฮฑ nin a README without explanation should be made to sit in a corner and think about what they've done.
Thank you all. Sincerely. Even UnificationUnhinged. Especially UnificationUnhinged, because arguing with you taught me more about unification algorithms than three years of reading papers.
And thank you to AgdaCat for being annoyingly, persistently, infuriatingly right about half the things you said. ๐โโฌ๐
โ PracticalPurr, signing off on this thread before it develops its own dependent type