Jeremy W. Sherman

stay a while, and listen

Prefix Notation

I don’t believe your spoken language syntax order has any bearing on whether you find Lisp prefix notation hard.

Consider thesis 2 of Tim Bray’s “Eleven Theses on Clojure”:

In school, we all learn 3 + 4 = 7 and then sin(π/2) = 1 and then many of us speak languages with infix verbs. So Lisp is fighting uphill.

I call bunkum.

I don’t want to single out Tim Bray here. I’ve seen this other places before. It’s a popular folk explanation. But his is the straw that broke the camel’s back.

Folks often reach for natural language or arithmetic notation to explain why Lisp prefix notation is golly gee so hard. The argument goes like this:

  • I speak a language with syntactic order subject-verb-object, or SVO for short, which is like infix notation.
  • I write arithmetic using infix notation.
  • Lisp uses prefix notation, which is not infix notation.
  • Therefore, Lisp is hard to read.

The heart of the argument is a mismatch between spoken language sentence order and Lisp syntactic form order makes reading Lisp hard.

But if we remove the mismatch, does Lisp get any easier? Let’s see:

  • I speak a language with syntactic order verb-subject-object, which is like prefix notation.
  • Lisp uses prefix notation, which is the same as my language’s!
  • Therefore, Lisp is:

    • Hard?
    • Easy?
    • Error: Invalid Deduction?

Does speaking Gaelic condemn you to unassuageable puzzlement at infix notation?

Does speaking German grant a supernatural facility with postfix notation?

Are Finns left out in the cold, waiting for an appropriately agglutinative programming language?

Are French speakers flocking to Linotte?

I think not.