News for hackers. Stuff that matters.
Re:"Why don't you use dependent types?" by oggy on Monday November 03, 2025 @05:41AM (#45797695)
Thank you for spelling this out; comments like these make this website worthwhile. You've enlightened at least one person today.

You hinted that there's more to QTT (or its implementation in Idris?) than this. Could you elaborate a bit on what these other features are, and what their purpose is?

Re:"Why don't you use dependent types?" by ChadNauseam on Monday November 03, 2025 @05:18PM (#45805120)
QTT supports three different "multiplicities". I discussed "used 0 times at runtime" (can be erased) and "used any amount of times at runtime" (cannot be erased). The remaining one is "used exactly once at runtime". These also cannot be erased, but allowing this constraint allows you to encode some very interesting things in the type system. The classic example is "resource protocols", e.g. file handles that force you to close them (and that you cannot use after closing).
Re:"Why don't you use dependent types?" by oggy on Tuesday November 04, 2025 @04:50AM (#45809142)
I see, so it unifies type (or I suppose term in this case?) erasure and linear typing? Thanks for the explanation!
Re:"Why don't you use dependent types?" by ChadNauseam on Tuesday November 04, 2025 @04:26PM (#45816072)
Exactly!