> * Regarding line length... the vt130 comment was funny, but not a
> real justification. I would suggest checking out a few public C/C++
> styleguides ( GTK+, Google Style Guides, ... ) for reference, most if
> not all recommend 80 char lines.
I would say that those people need to justify why they've set it, and
I'd guess it is more historical than meeting modern requirements. Today
a basic text editor can choose to wrap or not, and when to wrap. So for
instance in VIM I'll use:
:se wrap
:se nowrap
To change how I'm viewing the code. Same with collapsing deeply nested
code. I have my browser set to auto collapse[1]. Sometimes seeing the
full line is useful, sometimes it's more clear to not see it. But, I
believe this is a "user preference" not a way that the code should be
written. If you write it making a choice for the user, they can't undo
it easily. But if you have long lines, you're giving them a choice on
how they view the code to optimize for their goals.
[1] For the VIM people, what I use is:
set foldmethod=syntax
set foldlevelstart=3
> * Regarding line length... the vt130 comment was funny, but not a
> real justification. I would suggest checking out a few public C/C++
> styleguides ( GTK+, Google Style Guides, ... ) for reference, most if
> not all recommend 80 char lines.
I would say that those people need to justify why they've set it, and
I'd guess it is more historical than meeting modern requirements. Today
a basic text editor can choose to wrap or not, and when to wrap. So for
instance in VIM I'll use:
:se wrap
:se nowrap
To change how I'm viewing the code. Same with collapsing deeply nested
code. I have my browser set to auto collapse[1]. Sometimes seeing the
full line is useful, sometimes it's more clear to not see it. But, I
believe this is a "user preference" not a way that the code should be
written. If you write it making a choice for the user, they can't undo
it easily. But if you have long lines, you're giving them a choice on
how they view the code to optimize for their goals.
[1] For the VIM people, what I use is:
set foldmethod=syntax
set foldlevelstart=3