Skip to content

Improve function naming consistency. #50

Closed

Description

@vitaut

Currently there is an inconsistency in function naming. Some functions are named according to Google C++ Style Guide:

  • Format
  • Print
  • Clear
  • ReportSystemError
    ...

Other follow standard library conventions:

  • c_str
  • str
  • clear
  • resize
  • reserve
  • printf
  • sprintf
    ...

The names should be unified before the version 1.0 of the API is released. This is pretty arbitrary, but it's probably better to follow standard library conventions for public API for consistency with printf and because its done already for most functions.

Activity

  1. vitaut commented on Jun 29, 2014

    @vitaut
    ContributorAuthor

    To minimize the number of API changes, it might be useful to consider simplification of a common use case of formatting into an std::string here too. Currently it requires two function calls:

    str(Format("{}", 42));

    Ideally it should require a single function call. Possible ways to do this:

    1. Make format return std::string.
    2. Add another method (strformat) returning std::string.
  2. vitaut commented on Jul 2, 2014

    @vitaut
    ContributorAuthor

    Fixed in version 0.9.0.

  3. reopened this on Jul 27, 2014
  4. added a commit that references this issue on Jul 28, 2014
  5. added a commit that references this issue on Jul 29, 2014
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

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions