• Ephera
    link
    fedilink
    95 months ago

    Yeah, Rust can’t have proper reflection, since there’s no external runtime environment that keeps track of your state. Any such smartness either has to be compiled-in (which is how std::any and macros work) or you can implement something to keep track of this state at runtime, as if you were partially building a runtime environment.

      • @QuaternionsRock@lemmy.world
        link
        fedilink
        15 months ago

        And compile-time reflection will probably also continue to suck due to some irreconcilable limitations of type-safe generic specialization. Oh how I would love an equivalent to C++ template parameter packs…

      • @anlumo@feddit.de
        link
        fedilink
        English
        05 months ago

        No, the Rust Project recently made sure that Rust can’t have compile-time reflection.