3 ms·
Dependent typing can make guarantees like that if there are no loops, no parallel mutation, no I/O, no cosmic rays. For example if I made y have rand() elements
by zelly 6y ago
Dependent typing can make guarantees like that if there are no loops, no parallel mutation, no I/O, no cosmic rays. For example if I made y have rand() elements then there's nothing a compiler can ever do about that. In other cases the compiler can check types by executing code (not always decidable). Dependently typed languages are not Turing complete. They can help with proofs and such but it's physically impossible to use dependent types for general purpose programming (e.g. try writing Linux in Idris, you can't).
- sfvisser 6y agoDependent types strictly just means being able to parametrize types with values. You can design many different types of PLs with this feature. You don’t need strict reasoning for it to be useful like any other type level feature.