Skip to content

Ergonomics of String handling #26

Open
@kbknapp

Description

@kbknapp

From the survey, string ergonomics are huge. Many, many CLI applications deal heavily with strings. In Rust, strings can be...difficult.

Granted, (IMO) Rust handles them correctly, sometimes the correctness doesn't actually matter for a given problem domain and just adds unnecessary gyration.

For example, we have:

  • (&)('static)str
  • Cow
  • (&)String
  • (&)OsStr
  • (&)OsString

It's understanding it can be overwhelming. My personal opinion is we should first tackle/discuss the ergonomics of using OsStr(ing) as it's heavily used on Linux (where paths may not contain valid UTF-8).

IMO OsStr should have the same user experience as &str/String.

We could also probably start by either listing known issues/inconsistencies or any current issue links/RFCs on the matter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ergonomicsArea: Ease of solving CLI related problems (e.g. filesystem interactions)C-tracking-issueCategory: A tracking issue for an unstable feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions