| ▲ | eru 4 days ago | ||||||||||||||||
You don't need dependent types for that, either. | |||||||||||||||||
| ▲ | codebje 4 days ago | parent [-] | ||||||||||||||||
Not for matrix multiplication, because there's no term-level chicanery to worry about; you just need phantom types for the two dimensions on your matrix type. You can express a lot just carrying phantom types around and using basic pattern matching: in Rust I can express multiplication, concatenation of vectors to matrices, and inverses of square matrices, using phantom types. But I can't say this, or anything remotely like it:
In other words, there's no dependent pair construction without dependent types. (Or at least dependent kinds and some tricks.) | |||||||||||||||||
| |||||||||||||||||