Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Purpose of the Reset*** methods? #796

Closed
Giorgi opened this issue May 30, 2021 · 1 comment
Closed

Purpose of the Reset*** methods? #796

Giorgi opened this issue May 30, 2021 · 1 comment

Comments

@Giorgi
Copy link

Giorgi commented May 30, 2021

If the proto file contains messages with optional fields the classes generated by protogen contain ShouldSerialize*** and Reset*** methods. I understand the purpose of the ShouldSerialize methods but what is the purpose of Reset*** methods?

@mgravell
Copy link
Member

mgravell commented Mar 4, 2024

basically ShouldSerialize* and Reset* form two parts of a pre-existing pattern-based API used by multiple parts of the framework; we don't use them, but it makes some sense to emit them both; however, we can perhaps make this optional; cross-referencing #1134

@mgravell mgravell closed this as completed Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants