Skip to content

Conversation

liufengyun
Copy link
Contributor

@liufengyun liufengyun commented Sep 16, 2025

Add StringBuilder.appendCodePoint to support dealing with surrogate code points.

My use case: when parsing an escaped string in a language, we advance code point by code point on the raw string to properly handle Unicode. It will be convenient to have appendCodePoint such that we can assemble the code points in the final string.

@liufengyun liufengyun requested a review from a team as a code owner September 16, 2025 06:01
@scala-jenkins scala-jenkins added this to the 2.13.17 milestone Sep 16, 2025
@SethTisue SethTisue added library:base Changes to the base library, i.e. Function Tuples Try library:not-forward-bincompat labels Sep 16, 2025
*
* @param n a Unicode code point.
* @return this StringBuilder.
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add @since 2.13.17

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add codePointAt too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add codePointAt too?

I haven't found that useful in my experience. Maybe delay it when the need emerges.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add @since 2.13.17

It seems we don't have such an annotation --- it's available as a parameter for @deprecated. Or, maybe I have missed something.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean add it to the Scala doc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scala has a divergent philosophy about compatibility. Someone could do a master's thesis on how mixed projects cope.

I think the semantics of --release would be doctoral level. Programmers need to know what API to code against, builds need to know which runtimes they support.

@lrytz lrytz modified the milestones: 2.13.17, 2.13.18 Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
library:base Changes to the base library, i.e. Function Tuples Try library:not-forward-bincompat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants