Code Generation in Rust vs. C++26

(brevzin.github.io)

4 points | by steveklabnik 7 hours ago ago

1 comments

  • steveklabnik 7 hours ago ago

    Serde is a fantastic part of the Rust ecosystem, and is often credited as a reason people reach for Rust. This power and convenience coming to C++ should be a cause for celebration, in my mind. I am sad that Rust is missing an opportunity to do similar here, and hope that someone will pick the proposal back up someday.

    Barry was kind enough to share a draft of this with me, and he inserted this based on some of my feedback:

    > newer Rust has something called derive macro helper attributes which will make this easier to do.

    Apparently I am mistaken about this, and basically every Rust procedural macro does what serde does here. I find the documentation for this a bit confusing. I've emailed him to let him know, and please consider this mistake mine, not his!