Tabs In Computer Programs Must Die

January 29, 2009

I am ashamed to admit: This cost me more than an hour.

A tab that broke a program

After much effort at systematically debugging a mysterious problem, I isolated the troublesome code, yet nothing seemed wrong. Eventually I superstitiously decided to type it in again, verbatim. It started working. Now you can see the problem. 

This code is Arc. I often run it by copying-and-pasting bits and pieces into an Arc REPL in Terminal. Terminal removes all pasted tab characters. Thus the code Arc sees is (make-from-real-imaga b), at which point it complains of an undeclared identifier. Searching for that same identifier is fruitless in the text editor.


2 Responses to “Tabs In Computer Programs Must Die”

  1. Why are you coding in Arc? This isn’t the auto-grader is it?

  2. aran Says:

    @Andrew: No, not the auto-grader. I’m doing SICP in Arc.

Comments are closed.

%d bloggers like this: