|
|
|
|
|
by SuperV1234
36 days ago
|
|
I think this is a very bad take -- once you write it by hand you have to manually keep it in sync with the actual struct and ensure you made no mistakes. Reflection guarantees 1-1 future-proof mapping with the actual C++ struct, avoids boilerplate, and ensures that the serialization logic is correct. |
|
That is if you are worried about doing this by hand reflection is not the answer, something like protobuf where your data structures are generated is the answer.