Quantcast
Channel: Encoding – The Wiert Corner – irregular stream of stuff
Viewing all articles
Browse latest Browse all 160

Kris on Twitter: “Company chat: »Right, we need more languages with Emoji as variable type indicators and pointer symbols.«…

$
0
0

Please do not overdo Unicode outside the ASCII realm for identifiers and stay away from Emoji: [Wayback/Archive] Kris on Twitter: “Company chat: »Right, we need more languages with Emoji as variable type indicators and pointer symbols.«…”

Company chat: »Right, we need more languages with Emoji as variable type indicators and pointer symbols.«
»
🎼initializer🎱«
»
💦 mutable, 🧱 not.«
»
🎁 on the heap, 🥞 on the stack«
»
🍼 ctor, 🪦 dtor«
»� non-utf string result«
»any of
👩‍❤️‍💋‍👨 as a concat operator«
»
📁📂 block delims«

Just in case you didn’t get which Emoji is which, and how complex your Identifier BNF needs to be to support them: you can find the used Emoji via [Wayback/Archive] What Unicode character is this ? (the list below has IDs, code points and names copied from the official Unicode [Wayback/A] Emoji List, v14.0):

Character Code Sample CLDR Short Name Other Keywords
🎼 U+1F3BC U+1F3BC: 🎼 musical score music | musical score | score
🎱 U+1F3B1 U+1F3B1: 🎱 pool 8 ball 8 | ball | billiard | eight | game | pool 8 ball
💦 U+1F4A6 U+1F4A6: 💦 sweat droplets comic | splashing | sweat | sweat droplets
🧱 U+1F9F1 U+1F9F1: 🧱 brick brick | bricks | clay | mortar | wall
🎁 U+1F381 U+1F381: 🎁 wrapped gift box | celebration | gift | present | wrapped
🥞 U+1F95E U+1F95E: 🥞 pancakes breakfast | crêpe | food | hotcake | pancake | pancakes
🍼 U+1F37C U+1F37C: 🍼 baby bottle baby | bottle | drink | milk
🪦 U+1FAA6 U+1FAA6: 🪦 headstone cemetery | grave | graveyard | headstone | tombstone
U+FFFD REPLACEMENT CHARACTER
👩 U+1F469 U+1F469: 👩 woman adult | woman
U+200D ZERO WIDTH JOINER ZWJ
❤ U+2764 U+2764: ❤ red heart heart | red heart
U+F0EF   VARIATION SELECTOR-16 [VS16] VS16
💋 U+1F48B U+1F48B: 💋 kiss mark kiss | kiss mark | lips
👨 U+1F468 U+1F468: 👨 man adult | man
📁 U+1F4C1 U+1F4C1: 📁 file folder file | folder
📂 U+1F4C2 U+1F4C2: 📂 open file folder file | folder | open

Note that � is not actually an Emoji and that 👩‍❤️‍💋‍👨 was hardest as it is a bunch of Unicode code points (one with a variation selector) on top of each other (that is why it was split apart above) using the zero-width joiner code point feature:

[Wayback/Archive] 👩‍❤️‍💋‍👨 kiss: woman, man : U+1F469 200D 2764 FE0F 200D 1F48B 200D 1F468 Unicode Information | EmojiAll

  1. U+1F469 : WOMAN
  2. U+200D  : ZERO WIDTH JOINER [ZWJ]
  3. U+2764  : HEAVY BLACK HEART
  4. U+FE0F  : VARIATION SELECTOR-16 [VS16] {emoji variation selector}
  5. U+200D  : ZERO WIDTH JOINER [ZWJ]
  6. U+1F48B : KISS MARK {lips}
  7. U+200D  : ZERO WIDTH JOINER [ZWJ]
  8. U+1F468 : MAN

From a BNF point of view it might be a lot easier to just allow Emoticon in stead of Emoji in identifiers, but Emoticons tend to use symbols used in other places of the language.

Oh, below is the image Kris quoted, as it is similar to both Unicode “magic” and programming identifier “magic”:

–jeroen


Viewing all articles
Browse latest Browse all 160

Trending Articles