Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think we need some contextual line width limits. When splitting a function/method definition over multiple lines, I like to align the parameters. Now if there is a short line limit this will force us to left align the parameters instead. This has the consequences that there is less visual, spatial, distinction between method definition and their code, resulting in a big hodgepodge of characters.

If we have contextual limits, we can make method headers arbitrarily long while keeping the body within a tight limit. Or allow a longer line when defining a lambda in python as another comment laments.



> When splitting a function/method definition over multiple lines, I like to align the parameters.

Please don't do this. It's horrible for us who use proportional fonts.

In fact I would go as far as arguing that "artificial" line breaks are always bad. They aren't really more readable, quite the opposite usually, and most importantly they break diff.

I like short lines, and it's a good ideal to strive for. 98.5% of my code fits in 80 columns, but if I need a longer line, don't artificially make it worse in the pursue of some arbitrary rule.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: