On Wed, Jan 1, 2014 at 12:33 PM, Dahua Lin <[email protected]> wrote:
>
> I agree that overly long lines hurt readability. However, I think a hard
> threshold of 80 chars is too restrictive. Just take a quick skim of the
> Julia code base, you will find plenty of lines well beyond this limit (even
> lines over 120 chars are not uncommon).
>
> This is kind of related to some of the Julia's language features (e.g.
> parameter annotation, and one-line definition of functions, etc). In such
> cases, code lines that are a little bit longer wouldn't make a big problem.
> I found it sometimes even more annoying to break lines simply for the sake
> of the fitting some limit on line length.
>

I think that this points to some additional guidelines about how to cleanly
break expressions up across line breaks. I tend to follow python guidelines
on this, though I'm python-biased:

http://www.python.org/dev/peps/pep-0008/#indentation

I think it's good to have a number (80 chars) for what's considered a long
line. I typically am working in a terminal window with several files open
side-by-side, and having a consistent width makes it easier to navigate and
see what's going on. It also makes the code easier to read in diffs, on
github, etc.

-s

Reply via email to