3 ms·
Can’t we rely more on Rust’s Pattern Matching and it’s strong type system? Reflection seems more helpful when the programming language is little unsounded.
by kp995 4y ago
Can’t we rely more on Rust’s Pattern Matching and it’s strong type system?
Reflection seems more helpful when the programming language is little unsounded.
- jswrenn 4y agoAbsolutely! That's the approach that frunk [0] takes. Frunk (and other reflection libraries like it) are suitable for most use cases, and make better use of Rust's affordances. My crate is suitable for cases where you cannot know (or control) the set of types you might need to reflect on in advance. It's primary use-cases are related to debugging. [0]: https://docs.rs/frunk https://docs.rs/frunk
- halfmatthalfcat 4y agoIs Frunk Rust's Shapeless (from Scala)?
- jswrenn 4y agoYep!