-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
API design suggestion: rename UnmarshalOptions to Unmarshaler #1586
Comments
As far as I understand, yeah, the type-alias wouldn’t introduce any overhead to performance or inlining. There’s already so much type aliasing in the standard library, that if it were a performance impact, then it should have been handled already. |
You'd also want to rename the types in the It's been a while, but I think we went with Renaming Personally, I'm dubious that the improvement is worth the churn. |
FWIW: I found the "options"-laden names confusing when studying the new API. I literally asked myself as I was reading the APIs: "Options, but for what? What's taking them?" |
Renaming |
Capturing this suggestion from @matttproud over in matttproud/golang_protobuf_extensions#22:
Seems like a reasonable change to me on first glance.
We should verify that type aliases like
type protodelim.UnmarshalOptions = protodelim.Unmarshaler
don’t have any adverse effects on performance/inlining (probably fine).We should also do a quick survey to see how widely used the Options types are, and then judge the churn against the benefit.
Filing this here for now to give folks a chance to chime in.
The text was updated successfully, but these errors were encountered: