Comment by kazinator

Comment by kazinator 3 days ago

3 replies

> I have to scan to see who does what with who.

Are you saying that parentheses introduce the problem of having to scan to see what goes with what?

As in, if we don't have parentheses, but still have recursive/nested structure, we don't have to scan?

doodlebugging 3 days ago

For myself the issue goes back to my college mathematics courses, especially differential equations. I worked those homework problems by hand on a large format tablet, roughly 24" x 36", carefully laying them out step by step so that I could walk through them in the future and make sense of the solution process. Counting and matching parentheses was pretty critical since a missed parenthesis may not pop out at you like it would in a compiler error or by walking through code.

I automatically count and match even today, 40 years later.

Retr0id 3 days ago

Python block indentation is an example of nested structure that's at least easier to visually scan. You don't need to count opening/closing parens, just look down a column of text - assuming nobody mixed tabs and spaces. (but I wouldn't go as far as saying you don't need to scan it)

  • User23 3 days ago

    Canonically indented Lisp reads an awful lot like Python. You don’t read the braces, you read the indentation.