(RFC) option: rewrite the API to use composition

See #9355 for discussion.