2 ms·
And what if you want to implement something like Rust's "derive"? That is what the article shows. As far as I understand you would have to mess with individual
by throwaway7356 5mo ago
And what if you want to implement something like Rust's "derive"? That is what the article shows.
As far as I understand you would have to mess with individual parser tokens in Rust instead of high-level structures like "enum" (C++ reflection). It would be much, much uglier to implement anything like "to_enum_string" in Rust as you would have to re-implement parts of the compiler to get the "enum" concept out of a list of tokens.