by noahlt · 16y ago · 0 comments
There's one difference, though: conventional Python is indented four, not two, spaces. In fact, the main aspect of his "normal" C code that makes it more readable (to me, at least) is his use of four spaces for indentation.
Personally I think the biggest barrier to Lisp readability is too little indentation (two spaces is typical). Looking at his reformatted Lisp, the way I identified the nesting level of his highlighted line was not by looking at trailing parens but by looking at the indentation, which was much wider (and therefore clearer) than standard Lisp.
do something;
do something else;
do something else;
do something else;
do something else;
Sequences like that give you long columns of aligned text that make it much easier to judge relative indentation on the screen.Lisp's readability advantage (if it indeed has one; I'm giving it the benefit of the doubt for now) are at the whole-program level. On the function level, it seems more difficult than imperative languages. It would be more fair, and more to the point, to compare it to functional languages. If you write in an imperative style in Lisp, all the parens line up neatly, and it isn't so hard to read. But who codes that way unless they have to?
In this Scheme RFI, "I-expressions" can be freely mixed with S-expressions in source:
http://srfi.schemers.org/srfi-49/srfi-49.html
This argument for I-expressions touches on many of the same points as the OP; e.g., whether source needs to be readable independently of the editor:
http://www.dwheeler.com/readable/retort-lisp-can-be-readable...
The real problem is two-space indents. The example would have been much easier with even four-space indents.