Hacker News new | ask | show | jobs
by kevindong 2682 days ago
> but all right-thinking people know that (a) K&R are right and (b) K&R are right > ... > Rationale: K&R.

I REALLY do not like just calling something correct because it was in the K&R book.

> Also, note that this brace-placement also minimizes the number of empty (or almost empty) lines, without any loss of readability. Thus, as the supply of new-lines on your screen is not a renewable resource (think 25-line terminal screens here), you have more empty lines to put comments on.

Is that really an acceptable justification in the era of cheap 4K displays?

4 comments

> I REALLY do not like just calling something correct because it was in the K&R book.

The statement you quoted is simply saying that the author agrees with K&R. Nothing wrong with it.

> Is that really an acceptable justification in the era of cheap 4K displays?

Keeping line count down help readability. Some people use high resolution with small fonts but that makes my eyes hurt so my terminal has 45 lines when maximized.

I don't care how big your screen is. There is a limit to how many lines can fit in my field of vision.
One day someone should try shrinking brace-only lines to half height in graphical editors.
There are already editor plugins doing that, compressing empty lines is slightly more common but some also support braces. For example https://marketplace.visualstudio.com/items?itemName=OmarRwem...