Previous Entry Share Flag Next Entry
05:55 pm, 25 Aug 05

language designers

Larry Wall was at Google recently and I managed to sit by him at a talk on Perl 6. Afterwards, I got to ask him: "Have you looked at Haskell?" He replied, "I don't get into the implementation." But, I explained, what I was really asking was more related to borrowing ideas; the Perl tagline is all about borrowing weird ideas from other languages, and Haskell has a bunch of weird ideas, some of which are very Perly. (Haskell is especially nice at expressing lots of program with little code in an impenetrable* way using very concise syntax -- one of Perl's areas of expertise.) But he hadn't.

I also saw the recent threads about Python removing lambda and map. It's good that they're leaving, but only because they were crippled in the first place. I wrote some code recently that involved a callback that needed to just call a function and return True, but it expanded to four lines:
    def timeoutcb():
      return True
    gtk.timeout_add(1000, timeoutcb)
because a Python's lambdas are "syntactically restricted to a single expression." Even Perl got this one right: timeout 1000, sub { loadimage(); 1 }.

Both of these experiences let me down. I had expected this kind of unimaginativeness from Python (what's the distinction between statements and expressions anyway?), but I was pretty disappointed in Larry's answer, and the Perl 6 talk in general.

(...can you tell I'm writing Python code at work and getting cranky about it?)

* I say this with some sarcasm; I'm actually a fan of this. I like that experienced Perl programmers can say a lot with a little. We appreciate complexity in spoken language -- I can say "superfluous" even though a phrase like "unneeded extra" would do -- but we frown on the analogous thing in programming languages for "maintainability reasons". To me it makes no sense; it's like dumbing down the vocabulary in a book just because you expect your readers to not be able to understand it, despite the book itself being about a very complicated subject.