Skip to content
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

Define a stable API #10

Open
6 of 11 tasks
Viatorus opened this issue Dec 8, 2022 · 1 comment
Open
6 of 11 tasks

Define a stable API #10

Viatorus opened this issue Dec 8, 2022 · 1 comment
Milestone

Comments

@Viatorus
Copy link
Owner

Viatorus commented Dec 8, 2022

Doesn't need to be 100 % non breakable but it would be good to make some basic decisions.

Every help is welcome! :)

  • is the naming of classes and functions plausible

    • reader APi
      • read_char, read_n_chars, read_int<int>?
    • writer API
      • explicit write_char(char), write_str(str), write_int(int) instead of implicit write(char), write(str), write(int)....
  • emio::err does not have a explicit value for success (zero) - is this okay? I think, it does make switches over emio::err simpler since no one should receive a zero out of a emio::result

  • Should there be support for anything else then char? --> NO

    • wchar? char8_t? char16_t? char32_t? Does this make sense?
    • if not, many classes could be template free
    • if needed, would it be better to have reader<char> or using reader = basic_reader<char>; (same for writer, runtime etc...)?
    • Should format/vformat/print/vprint internal call value to simplify nearly fail-safe API?
  • explict emio::result constructor with ok/error + basic_result for user error types

  • Format spec: allow precision for strings: format("{:.2}", "hello") -> "he"

@Viatorus Viatorus added this to the 1.0.0 milestone Dec 8, 2022
@Viatorus
Copy link
Owner Author

I wonder if emio::parse would be a better name instead of emio::scan since scan does not read from cin (unlike scanf from C).

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

No branches or pull requests

1 participant