|
|
|
|
|
by estebank
1284 days ago
|
|
Reflection is usually not available in AoT compiled languages. The prevalent Rust coding styles rely heavily on monomorphic data types and functions, meaning there's nothing left to reflect at runtime. But if you want to deal with trait objects and need to access the underlying type, you need to use Any::downcast or rely on annotations on every type you want to reflect on. Or now, leverage DWARF info on Linux with deflect. |
|
Compile time reflection AFAIK is available in D and Zig, and is planned for C++.