Skip to content

Capy types need renaming #395

Description

@sgerbino

Capy's viability goes beyond I/O. Many of our types are centered around I/O. Let's fix that.


Survey of the land:

Public types

  • IoAwaitable — concept, include/boost/capy/concept/io_awaitable.hpp:127
  • IoAwaitableRange — concept, include/boost/capy/concept/io_awaitable.hpp:155
  • IoRunnable — concept, include/boost/capy/concept/io_runnable.hpp:91
  • io_result — alias template for std::tuple<std::error_code, Ts...>, include/boost/capy/io_result.hpp:52
  • io_task — alias template for task<io_result<Ts...>>, include/boost/capy/io_task.hpp:33
  • io_env — struct, include/boost/capy/ex/io_env.hpp:44
  • io_awaitable_promise_base — class, include/boost/capy/ex/io_awaitable_promise_base.hpp:86

Detail types (all in include/boost/capy/detail/io_result_combinators.hpp)

  • io_result_payload — struct template, line 47 (specializations at 50 and 56)
  • io_result_payload_t — alias template, line 62
  • io_result_from_payload — struct template, line 85 (specializations at 88 and 97)

Outside the library (bench/example/test only)

  • io_env — struct, bench/beman/sender_io_env.hpp:211
  • io_sender_env — struct, example/awaitable-sender/awaitable_sender_detail.hpp:62
  • io_context — class in a doc-reference test, test/doc/reference/execution_context.record.cpp:48
  • Test fixtures: io_param_test, io_awaitable_promise_base_test, io_result_test, io_awaitable_test
  • Doc-snippet helpers: io_step (4h_lambda_captures.cpp:36, 4g_allocators.cpp:197), io_awaitable_form (9o_why_not_tmc.cpp:57), io_awaiter_signature (4d_io_awaitable.cpp:62), io_awaitable_sketch (9k_executor.cpp:134)

IoAwaitable suggestions made:

  • EnvAwaitable (Vinnie)
  • ExecAwaitable (Steve)
  • EnvAwareAwaitable (Andrezj)

I propose the simplification of the following type names:
capy::io_result<> -> capy::result
capy::io_env -> capy::env

For capy::io_task<...> we could just drop the alias. It would be capy::task< result<...> >

The same pattern can be applied to io_sender_env. (io_context not included, it is correct and Corosio's).

Obviously io_awaitable_base will follow whatever we can decide on for the IoAwaitable concept.

Comment your thoughts and opinions!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions