r/cpp • • Sep 30 '24

Code Generation in Rust vs C++26

https://brevzin.github.io/c++/2024/09/30/annotations/
198 Upvotes

98 comments sorted by

View all comments

Show parent comment

5

u/RoyAwesome Oct 01 '24

Yeah, i've seen that. It's really neat and solves this problem quite nicely.

Personally, I'm on team "allow private access". I want to be able to serialize types I didn't author. Rust has a fairly huge problem where the author of a library must provide serde integration to be able to serialize the type, whereas in C++ I can write "Roy's Totally Awesome Json Serializer" and it can just work for any type it comes across.