…anywhere that someone wants to represent an integer in source code by using the corresponding Unicode character surrounded by single quotes.
That is the entire point of this proposal after all.
• • •
Personally, I am skeptical about whether we need such a feature in the language, but seeing how this discussion has proceeded for hundreds of posts, I’m willing to accept that some people find it beneficial to write integers that way.
And if we’re going to allow it, we might as well do it the obvious way that works as expected.
• • •
Let me put it this way:
If someone needs to be a Unicode expert to understand how the feature works and use it correctly, then it definitely does not belong in a high-visibility part of the Swift language. That would make it an attractive nuisance.
On the other hand, if the feature is intended for use by non-experts in Unicode, then it needs to work the way those people want and expect it to. Specifically:
If the character is a single scalar, then turning it into an integer should give that scalar. And if the character is not a single scalar, then turning it into an integer should fail.