The whitespace brigade

Syntactically significant whitespace is one of those debating points frequently raised in unproductive language thrashes involving Python. One persistent implication made by SSW-haters is that it’s a freakish mutation unique to Python. Or, if they’re feeling particularly vicious, they’ll bring up Fortran. Cold comfort.

In fact, there are quite a few other languages that have gone down this path. Flipping through a big fat book that I bought because Steve Yegge recommended it, I came across mention of a couple that were new to me. Then I went digging for more. Here’s an incomplete list:

  • In the beginning (1966) there was ISWIM, which was never implemented but was apparently the first language to cast off Algol’s semicolons
  • The ABC language, which famously influenced Python creator Guido van Rossum
  • Miranda
  • Occam
  • Various edge cases: the “whitespace thing” for OCaml, the markup language YAML, the Python-derived Boo, the eponymous Whitespace language.
  • Haskell, perhaps not coincidentally my new self-study project
  • And of course, the poster child, Python itself.

In my searches I came across the term “off-side-rule languages”, which I hadn’t heard before, though apparently some people use it. I think it’s a clunker. And “syntactically significant whitespace” is too much of a mouthful, and imprecise to boot (after all, whitespace between tokens is fairly significant!).

I think the field is open for a zippy marketing term. How about Spacejax? Space 2.0? Hmm, this is harder than I thought…


Andrew commented on Tue Jan 9 08:36:12 2007:

new buzz words are hard to come up with, but one of the rules is that you can’t reuse parts of other terms. (i.e. spacejax => space + ‘ajax’[1:]). It’s often common to create an acronym (i.e. ajax). That said, i nominate LUSS => ‘Languages Using Significant Spacing’


Jeremy commented on Wed Jan 10 12:20:27 2007:

I don’t know how you gathered your data, but neither SML nor OCaml have any more significant whitespace than a language like C. So listing “ML” as a whitespace-signficant language is wrong.


Paul commented on Wed Jan 10 12:54:45 2007:

Not sure how ML ended up in there; I’ve removed it. Thanks for the heads-up.

As for “the whitespace thing for OCaml”, try following the link!



Share: