4 ms·
Is there any plans to officially add a runtime reflection system to Rust standard library? It feels really weird to me that a relatively new language doesn’t in
by DethNinja 6y ago
Is there any plans to officially add a runtime reflection system to Rust standard library? It feels really weird to me that a relatively new language doesn’t include reflection out of box.
- nestorD 6y agoAt the moment no [0]. My undertsanding of the arguments is that macros and the type system already get you 90% of the way at compile time (while being able to cause compile time error if you made a mistake rather than obscure run time crashes) and that reflection has no benefit large enough to warrant the additional complexity and bug opportunities. [0]: https://internals.rust-lang.org/t/solid-reflection-in-rust https://internals.rust-lang.org/t/solid-reflection-in-rust
- souprock 6y agoThe reduced runtime overhead, including optional temptations, is what makes Rust an interesting and modern language. Language design took a wrong turn in the 1990s, leaving us stuck using very old languages from the 1970s.