Skip to content

Refactor Option to keep shared public API in a base class.#1196

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_930609452
Open

Refactor Option to keep shared public API in a base class.#1196
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_930609452

Conversation

@copybara-service

Copy link
Copy Markdown

Refactor Option to keep shared public API in a base class.

Only a private subset of Option's functionality relies on the memory layout of a specific instantiation. We can reduce the logic and generated code by factoring the public API out into a shared base class. This also makes it easier to see what the Option api without having to read the documented code.

@copybara-service copybara-service Bot force-pushed the test_930609452 branch 4 times, most recently from 3c1fc44 to 6eb7d5e Compare June 12, 2026 16:10
Only a private subset of Option's functionality relies on the memory layout of a specific instantiation. We can reduce the logic and generated code by factoring the public API out into a shared base class. This also makes it easier to see what the Option api without having to read the documented code.

PiperOrigin-RevId: 930609452
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

Successfully merging this pull request may close these issues.

1 participant