cketti
06/06/2025, 12:13 PM"\u{1F995}"
instead of "\uD83E\uDD95"
or "🦕"
. Granted, often it's preferable to use the last variant. But there are cases where (programming) fonts are missing glyphs or the code point isn't associated with a visible character. In such cases, having to use escapes of the surrogate characters just doesn't make for a great developer experience.
Does this sound like something that has a chance of being added to the language? Or would I be wasting my time if I wrote up a KEEP? (I already have a prototype to add support to the compiler.)cketti
06/06/2025, 12:14 PMCLOVIS
06/06/2025, 12:36 PM"\uD83E\uDD95"
is good enough. Would you disagree?cketti
06/06/2025, 12:37 PMcketti
06/06/2025, 12:40 PMCLOVIS
06/06/2025, 12:41 PMChar
?cketti
06/06/2025, 12:45 PM'\u{1F995}'
. Just "\u{1F995}"
.Youssef Shoaib [MOD]
06/06/2025, 12:46 PMcketti
06/06/2025, 12:49 PMcketti
06/06/2025, 12:50 PMCLOVIS
06/06/2025, 12:56 PMcketti
06/06/2025, 1:00 PMCLOVIS
06/06/2025, 1:13 PMcketti
06/06/2025, 1:16 PMCLOVIS
06/06/2025, 1:19 PMval Long.astral: String get() = TODO()
Instead of:
"\u{1F995}"
you get:
"${0x1F995L.astral}"
That's slightly more verbose, sure, but it is still quite simple, and more importantly doesn't require a language change.CLOVIS
06/06/2025, 1:20 PM.decodeUnicode
or similar, I guess)cketti
06/06/2025, 1:23 PMCLOVIS
06/06/2025, 1:25 PMKlitos Kyriacou
06/06/2025, 2:46 PMDoes that include the PRs to GitHub, GitLab, Bitbucket and all other editors so it displays properly?Why would they need to do that? If you display code in GitHub that has the line
println("\u03C0")
does GitHub display it as println("π")
?cketti
06/06/2025, 2:55 PMJP Sugarbroad
06/06/2025, 8:56 PM\U
like Python has is pretty reasonable.cketti
06/06/2025, 9:25 PM\u{…}
better. No leading zeros required.