5 ms·
I can't wait until they're ubiquitous. I think I read somewhere Rust was considering them. That'd be great.
by guerrilla 6y ago
I can't wait until they're ubiquitous. I think I read somewhere Rust was considering them. That'd be great.
- alpaca128 6y agoRust does support dependent types via traits, just not as explicit feature and also not in the most intuitive way.
- comex 6y agoNo, it does not. It has some support for types which depend on constant values (i.e. values known at compile time), but not types that depend on runtime values, which is the real power of dependent types.
- alpaca128 6y agoThere are literally talks on YouTube about using dependent types in Rust. In fact that is how I stumbled over the topic in the first place. So yes, it does. Just not in a convenient way, as I already mentioned.