(no title)
hmry | 9 days ago
Dependent typing requires:
- Generic types that can take runtime values as parameters, e.g. [u8; user_input]
- Functions where the type of one parameter depends on the runtime value of another parameter, e.g. fn f(len: usize, data: [u8; len])
- Structs/tuples where the type of one field depends on the runtime value of another field, e.g. struct Vec { len: usize, data: [u8; self.len] }
satvikpendem|8 days ago
hmry|8 days ago
Not that I blame them, nobody has figured out practical dependent typing yet. (Idris is making good progress in the field though)