We have Traits at Home

2 points by Defelo


hjvt

Delightful.

One thing this highlights for me, is how god-awful the reflection story in Rust is currently. For all the smugness about how much better than C(++)? we are, with our traits and hygienic macros, the derive story is straight up abysmal. What do you mean I need to manually (or using a third-party crate) re-parse struct definition from tokens? What do you mean each proc-macro needs to separately do the same?

80% of the time you just want to iterate the fields!