2 ms·
Well sure, that was my point. It seems like, even without dependent types, you could do a runtime check to prove anything you like in a type's constructor, and
by skybrian 12y ago
Well sure, that was my point. It seems like, even without dependent types, you could do a runtime check to prove anything you like in a type's constructor, and then other code can rely on it being true. But that doesn't mean it's practical to introduce a new type for every possible assertion, nor is the compiler assisting you very much with your proof.
- tel 12y agoIt's obviously a tradeoff, but dependent types can make the space of these assertion types more rich and also ensure that they are true by construction.