Right now, our APIs use a mix of pointers and direct object references. We should be more uniform in our approach here. Suggested guidelines:
- For structs representing messages (e.g., Welcome, Commit), fields are by value, except when optional
- For other structs (e.g., State, HPKEPrivateKey), fields are as produced / passed to APIs, thus usually pointers
- Fields in messages are by value, except when optional
- Objects are passed to/from API methods by reference (as pointers)
Right now, our APIs use a mix of pointers and direct object references. We should be more uniform in our approach here. Suggested guidelines: