On Tuesday, 15 January 2013 at 12:09:21 UTC, bearophile wrote:
1100110:

Thats so funny I forgot to laugh.

One common indentation-related bug is caused by relying on the indentation to understand code, while the curly brace language compiler ignores what you were seeing and only sees the braces. I have seen many cases of delayed code understanding caused by that. Making the syntax more DRY (this means stating the logical indentation using only one communication channel) helps avoid those mistakes (and reduces the visual noise, further helping code readability).


The sane option are either to acknowledge that code is in a text file and choose syntax construct that make it readable (python) or decorrelate the presentation of the code from its actual form in the file and use a formatted.

Other options are choosing on purpose to inflict an extra workload to yourself, and risking confusion on badly formatted code.

Reply via email to