|
|
|
|
|
by andyferris
580 days ago
|
|
It's an interesting point. You can't have it both ways though - support hard line limits because the mere discomfort of long lines is insufficent to convince the programmer to refactor to something clearer, and then argue that the mere discomfort of the line limit including indentation should convince the programmer to refactor deeply nested code into something simpler. Which is it? Do we want to force limits with say a linter (80 characters of width max, 5 levels of nesting max) or let the programmer choose based on comfort? I've had to implement things like an arbitrary-JSON formatter. Setting a fixed width including indentation doesn't work - there would always be (deeply nested) values you simply cannot print according to the rules (excluding, of course, strings which have their own difficulty). I kinda feel 80 characters excluding indentation works out ok in practice in a variety of settings. |
|