Hacker News new | ask | show | jobs
by zeeboo 1840 days ago
So, I thought this at one point, too. But it turns out that methods is a type alias to an unnamed type, so there's no package level privacy issues: https://github.com/protocolbuffers/protobuf-go/blob/v1.26.0/...
1 comments

Oh huh, interesting, I've never seen that done before.

I'm struggling to understand what the rationale _for_ doing it is though. Maybe it's to avoid an import cycle?

Yes, to avoid an import cycle or polluting the protoreflect API documentation with a rather large non-user-facing API surface.