Hacker News new | ask | show | jobs
by petters 722 days ago
Serialisation often needs additional information not present in the struct definition: for enabling backwards-compatibility and default values.

Same for command line parameters. We want documentation strings, maybe dashes in the name etc.

But that can surely be solved with a little more advanced struct

1 comments

I have one word for you: attributes (which the compiler, and the reflector, know about).
Yes you’re right. That has worked well enough in other languages