When Arc version 0 was released last week, people quickly seized upon Paul’s comment that he hadn’t spent any effort on supporting Unicode as some sort of heresy. The highest-rated comment in the Reddit thread declared Arc “instantly obsolete”.
Inevitably, few noticed that Arc actually supports Unicode pretty well. Arc’s primitive character type works with any Unicode codepoint; built-in functions like len work correctly when applied to strings with multi-byte characters; and Arc has no problem with Unicode-containing identifiers in source files:
arc> (def héλλô () (prn "héλλô world"))
#<procedure: héλλô>
arc> (héλλô)
héλλô world
"héλλô world"
arc>
Let’s see how other (presumably non-obsolete?) languages like Python and Ruby fare:
$ cat > foo.py
def ô():
return "ô"
$ python foo.py
File "foo.py", line 1
SyntaxError: Non-ASCII character 'xc3' in file foo.py on line 1, but no
encoding declared; see http://www.python.org/peps/pep-0263.html for
details
$ cat > foo.rb
def ô
"ô"
end
$ ruby foo.rb
foo.rb:1: Invalid char `303' in expression
foo.rb:1: Invalid char `264' in expression
foo.rb:2: syntax error, unexpected tSTRING_BEG, expecting 'n' or ';'
return "ô"
The programming world (and the Lisp community especially) is no stranger to excellent flamewars, but the debate surrounding Arc’s “lack” of Unicode support ranks right up with the very best.
Footnote: Due to Arc’s Unicode support, it was fairly easy to add Unicode support to Hacker News. I submitted a patch to do so back a few weeks ago, and it went live today.
Update (7/2): Markus points out in the comments that my example works fine in Ruby 1.9, and he’s right. At time of writing, though, the latest stable version of Ruby is 1.8.6-p111, so I think the original point still stands.