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

[String] renamed core classes to Byte/CodePoint/UnicodeString #33816

Merged
merged 1 commit into from Oct 7, 2019

Conversation

@nicolas-grekas
Copy link
Member

commented Oct 2, 2019

Q A
Branch? master
Bug fix? no
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

In #33553 there have been discussions about the naming of the classes - eg. "what's a grapheme", "why Utf8String", "lowercase on binary is weird", etc.

What about these names? Would they get your votes vs the current ones?

  • BinaryString -> ByteString
  • Utf8String -> CodePointString
  • GraphemeString -> UnicodeString
@nicolas-grekas nicolas-grekas added this to the 5.0 milestone Oct 2, 2019
@nicolas-grekas nicolas-grekas force-pushed the nicolas-grekas:string-uni branch from dbc9b44 to 054e599 Oct 2, 2019
Copy link
Member

left a comment

I like the new names a lot: ByteString and UnicodeString would be self-explanatory for most developers and only CodePointString would need some explanation for some people (but that's normal ... this is a "complex" topic, so developers need to learn some terminology).

@yceruto
yceruto approved these changes Oct 3, 2019
@nicolas-grekas nicolas-grekas force-pushed the nicolas-grekas:string-uni branch from 054e599 to d54fd8d Oct 4, 2019
@nicolas-grekas nicolas-grekas force-pushed the nicolas-grekas:string-uni branch from d54fd8d to 63c105d Oct 4, 2019
Copy link
Contributor

left a comment

I like the new naming. In the original PR, I especially found the name BinaryString problematic. If we look at the operations that this class allows, the class does not represent an arbitrary binary string, but a character string with some one-byte character encoding, e.g. ISO-8859-something. The new name reflects that better, imho.

nicolas-grekas added a commit that referenced this pull request Oct 7, 2019
…tring (nicolas-grekas)

This PR was merged into the 5.0-dev branch.

Discussion
----------

[String] renamed core classes to Byte/CodePoint/UnicodeString

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

In #33553 there have been discussions about the naming of the classes - eg. "what's a grapheme", "why `Utf8String`", "lowercase on binary is weird", etc.

What about these names? Would they get your votes *vs* the current ones?
- `BinaryString` -> `ByteString`
- `Utf8String` -> `CodePointString`
- `GraphemeString` -> `UnicodeString`

Commits
-------

63c105d [String] renamed core classes to Byte/CodePoint/UnicodeString
@nicolas-grekas nicolas-grekas merged commit 63c105d into symfony:master Oct 7, 2019
1 of 3 checks passed
1 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details
fabbot.io Your code looks good.
Details
@nicolas-grekas nicolas-grekas deleted the nicolas-grekas:string-uni branch Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.