2008-01-31 / 21:29 / dave

Well it’s finally happened: Arc’s out (also check out the Arc language page and the Arc tutorial). Paul Graham’s been an advocate of rapid prototyping*, but Aristotle Pagaltzis thinks he’s made a mistake by ignoring Unicode.

Getting character strings right, however, is something that you really do need to get right at the core language level. You cannot leave it for libraries to fix…

Leaving Unicode support in a language “for later” means you will spend a huge chunk of time sometime in the future to put it into the language – or you won’t, and then programs written in that language will forever be verbose when dealing with strings.

Aristotle Pagaltzis, Paul Graham’s kind of dirty

I can’t speak on the importance of Unicode–my internationalization experience is putting <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> in my header so I can post cool looking characters–but I am curious as to how, and more importantly when, Arc will get Unicode. My guess is “as soon as Paul Graham needs it.” So maybe if people request internationalized Hacker News comments or if he needs it to filter spam; or maybe someone else will need it and submit a patch,

Either way–waiting until it’s needed or waiting for a patch–is agile (“quick and dirty” as Paul calls it): don’t implement Unicode until you need it, and then pick only the implementation you need. It isn’t that different from other language evolution processes such as the JCP or Python’s PEPs. Python didn’t have Unicode until v1.6 (I think), and Unicode won’t be the native string representation until Python 3000. But it’d be hard to call either Java or Python’s evolution agile: “nearly forever” and “forever” are the times it takes to add a change and the intended lifetime of changes, respectively. Forever is not very agile.

One way to shorten the time is to ignore backwards compatibility. I think Aristotle misinterprets Paul’s Guido van Rossum parable: Paul is saying that Guido’s “year of Unicode” wasn’t spent implementing, it was spent thinking about backwards compatibility. In Arc… well, “we’ll change stuff without thinking about what it might break, and we won’t even keep track of the changes.” But there is an existing Arc user who will probably be unhappy if language changes slow him down: Paul “fast hacker” Graham himself. So I can’t imagine he’ll break things in a way that’s not easily fixed (say by prefixing your ASCII strings with a single b).

Which makes me wonder just how agile will handle language design. I believe in the general theory of agile, but there do seem to be times when thinking about the problem helps. Lots of elegant languages certianly seem to have been well-cogitated: Lisp, Smalltalk, Haskell, Erlang and REST (yes, I know it’s not a language). On the other hand, we have a language designed to get it done: Perl. Paul Graham has said that Perl is a hacker’s language, but I think it’s safe to say that Arc ends up as Perl-on-Scheme no one will be very impressed. (For what someone else has said about Perl as a hacker’s language, read Erik Naggum’s classic diatribe. PS: I used to write a lot of Perl.)

This is, of course, hindsight. I don’t know what went into the design of Lisp or Smalltalk. Was the elegant insight only derived after hundreds of ugly versions? For instance REST wasn’t designed, it is just a name pinned to the web’s best practices. Arc also isn’t trying to reinvent programming. In it’s current form, it’s a little syntax sprinkled on top of Scheme, which matches Paul’s claim that “the best kind of quick and dirty programs seem to be ones that are mathematically elegant, but missing features”: mathematically elegant = Scheme, missing features = everything not in Arc.

He also says that “good cleanness is a response to constraints imposed by the problem.” Aristotle’s problems require Unicode, and I doubt he’s alone. At some point Unicode support will show up. But when? And will it be elegant? And how much code will it break? Aristotle seems to think the answers are “too late”, “no” and “lots” while Paul’s answers are “when it’s needed”, “sure” and “who cares?”

Me? I’m content to wait and see.

*Though I guess you could say that waiting 6 years for your 1st release is a slow start.

EDIT: fixed typo in Aristotle’s title