[haiku-development] Re: The 80 columns limit?

  • From: Ryan Leavengood <leavengood@xxxxxxxxx>
  • To: "haiku-development@xxxxxxxxxxxxx" <haiku-development@xxxxxxxxxxxxx>
  • Date: Mon, 6 Sep 2021 12:06:14 -0400

On Mon, Sep 6, 2021 at 11:53 AM Alexander von Gluck IV
<kallisti5@xxxxxxxxxxx> wrote:


My only worry about the soft limit vs hard limit is it will create a lot of
discourse in gerrit over line lengths which will be pretty frustrating
to contributors.

(at least with a hard line length limitation the message is pretty clear)

That's fair. But I think the basic idea is to strive to keep your code
at lower levels of nesting/indentation, but if you do have that
unavoidably long "if" statement at least having 100 columns as a hard
limit can make it less awkward. I feel like in my experience when code
hits 80 or more it is usually only by a small bit which is not very
obvious and why we spend so much time policing it. I bet this change
will streamline reviews more and someone going over 100 will be more
obvious.

Also if we want to clarify votes before I said 100 or 120 but I think
100 columns will make a noticeable positive difference in the need for
awkward reformatting.

Funnily enough when I used VSCode as my editor (which is a bit less
these days) I always have column markers configured at 80 and 100,
which I do generally treat as a soft and hard limit. Recommending that
people configure their editors for this might help (adding the feature
for multiple column markers as needed to the common Haiku editors
would be good too.)

-- 
Regards,
Ryan

Other related posts: