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

strings: document properties of EqualFold #44867

Open
dsnet opened this issue Mar 8, 2021 · 3 comments
Open

strings: document properties of EqualFold #44867

dsnet opened this issue Mar 8, 2021 · 3 comments
Labels
Documentation NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@dsnet
Copy link
Member

dsnet commented Mar 8, 2021

It is unclear whether EqualFold implements some common operation defined in the Unicode standard. If so we should document what that is and reference it. It is also unclear what properties of EqualFold are guaranteed. Is it safe to assume that EqualFold holds to the same relations that one would expect from equality?

  • Reflexive: strings.EqualFold(a, a)?
  • Symmetric: strings.EqualFold(a, b) == strings.EqualFold(b, a)?
  • Transitive: if strings.EqualFold(a, b) && strings.EqualFold(b, c), then strings.EqualFold(a, c)?

Similar documentation should be made on bytes.EqualFold

@toothrot toothrot added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Mar 8, 2021
@toothrot toothrot added this to the Backlog milestone Mar 8, 2021
@toothrot
Copy link
Contributor

toothrot commented Mar 8, 2021

/cc @griesemer

@griesemer
Copy link
Contributor

Originally written by @rsc ( https://codereview.appspot.com/5143044 ).

@gopherbot
Copy link

Change https://golang.org/cl/336431 mentions this issue: strings, bytes: document properties of EqualFold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

4 participants