|
|
|
|
|
by maccard
35 days ago
|
|
Serialization is the canonical example. Being able to turn struct MyStruct {
int val = 42;
string name = "my name";
};
into {
"val": 42, // if JSON had integers, and comments of course
"name": "my name",
}
is incredibly powerfuly. If reflection supported attributes (i can't believe it shipped without, honestly), then you could also mark members as [[ignore]] and skip them. |
|
(The link above shows ImGui generation, but the same exact logic can be applied for serialiation to JSON/YAML/whatever.)