News for hackers. Stuff that matters.
Re:C4: C in Four Functions (2014) by GuB-42 on Tuesday February 18, 2020 @07:47AM (#22355577)
Because it make the lines longer and long lines are bad. If it results in a horizontal scrollbar, it is terrible, but even without it, there is a reason papers are often printed in column format and most coding rules specify a maximum line length (often 80, though 120 is becoming popular these days, with big wide screen and all that).

So long lines need to be split. Which is difficult to do properly and results in more lines, and more lines mean less of the code is visible at once and that makes it harder to see the big picture.

But to each his own I guess. Anyway, you can try it out yourself. Just take the code, do the replacements and see for yourself.

Re:C4: C in Four Functions (2014) by psychoslave on Wednesday February 19, 2020 @01:58AM (#22363597)
Started here: https://github.com/psychoslave/c4

But help would be welcome to retrieve the intended meaning for many of variable names that were turned to nonsense, be it a comment here, an issue on the repository, a pull request or anything else.

Re:C4: C in Four Functions (2014) by Minor49er on Tuesday February 18, 2020 @01:35PM (#22358759)
There are often ways of reformatting a line to break it if it's too long that also does not require renaming things. For example, a long list of conditions in an if statement can be broken into one condition per line. Results of comparisons can be put into their own variables. Logic flow can be adjusted and produce the same result. And so on.
Re:C4: C in Four Functions (2014) by Hnrobert42 on Tuesday February 18, 2020 @08:09AM (#22355729)
Are you reading this on an Apple Watch? I still generally use 80 characters out of habit, but given how monitors have grown, 120 or even 140 should be the new norm.
Re:C4: C in Four Functions (2014) by clarry on Tuesday February 18, 2020 @08:21AM (#22355810)
Adding an extra column for code|docs|other context is so much more useful than allowing longer lines for obese identifiers that rarely serve to make a point more clear.

I'll take my four or five columns of 80 chars over two columns of 120-140 chars any day.