A yen for more symbols

2007-09-13, Comments

Apparently true: at one point Perl 6 used ¥ U+00A5 YEN SIGN as a zip operator, for the excellent reason that this particular symbol looks like a zip.

my @tile_values = < A B C D E F > ¥ (1, 3, 4, 2, 1, 4)

Sadly this witty visual pun seems to have been deprecated. All programming languages I know of are firmly stuck in the 7-bit ASCII range, where the only currency character is the good old American $ 0x24 DOLLAR SIGN.

There are plenty of useful symbols for programmers once you’re willing to advance into Unicode space:

  • Multiplication × U+00D7 MULTIPLICATION SIGN, obviously
  • Haskell would surely prefer a real λ U+03BB GREEK SMALL LETTER LAMDA to the backslash currently used for anonymous functions
  • Pointers would be less threatening if we could dereference them with a → U+2192 RIGHTWARDS ARROW
  • And there are lots of nice symbols we could use for assignment, ↤ U+21A4 LEFTWARDS ARROW FROM BAR for example, and then we could use the EQUALS SIGN for equality and fix several bugs
  • Proper logic symbols for and, or, not, which wipe the floor with &&, ||, !
  • I won’t even try to list the exciting mathematical symbols and the possibilities they open up. Let’s just say we’d all use container operations if ∀ U+2200 FOR ALL were available