top | item 98963

Donald Knuth: Using Indentation to Represent Program Structure

9 points| hhm | 18 years ago |jeremyhylton.blogspot.com | reply

3 comments

order
[+] jsnx|18 years ago|reply
The objection that, in the midst of a long document, telling what level of indentation one is at would be difficult is easily addressed by having the editor show space marks or using 'fold lines' in print -- neither of which is difficult.

In practice, though, I never have any problem with indentation based syntax, because change in indentation is easy enough to detect, and that's good enough for anything I've ever had to read.

[+] anamax|18 years ago|reply
Indentation is merely horizontal positional information.

The idea of using position to convey information is very old - music is written using vertical position information.

[+] bayareaguy|18 years ago|reply
When I work in Python, I find I need to use emacs' support for rectangle editing frequently when rearranging nested blocks.