Skip to content

Why not separate string types for each encoding? #40

@conrad-watt

Description

@conrad-watt

I haven't been part of the conversations surrounding this specific proposal, so apologies if I'm retreading previous discussions. I'm not specifically hoping to effect a concrete change to the proposal with this question - I mainly want to understand the design better.

The operations on the stringref type already seem rather opinionated in the actual encodings supported - (e.g. encode_wtf16 and encode_wtf8). Moreover, the current proposal introduces separate view types for wtf16 and wtf8. Was a design considered where there are separate stringref_wtf16 and stringref_wtf8 types instead of a "unified" stringref type? IIUC this would eliminate the need for separate view types (except perhaps stringview_iter).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions