On Sat, Apr 07, 2018 at 01:14:33PM -0700, Ori Bernstein wrote: > On Sat, 07 Apr 2018 19:00:37 +0300, 8hal...@airmail.cc wrote: > > > Just an amateur C programmer looking for answers. My main inspirations for > > code style is K&R 2nd edition and I'm curious about the instructions in Plan > > 9's style(6) manual page (for reference, > > http://man.cat-v.org/plan_9/6/style). I've > > tried to think about the motivations, but not everything is as clear as > > it seems. > > The manpage explains the reasoning: > > Ultimately, the goal is to write code that fits in with the > other code around it and the system as a whole. > > So, most of the answers to your questions are simply that someone had a > preference early on. They wrote the code. If you want your code to fit > in with theirs, this is how to do it.
Indeed. When there are almost as many rational arguments for or against some choice, this means that the subject is not essential (there is no "truth"). In this case, for engineering reasons, the goal shall be consistency: one person ("the chief") decides. Furthermore, if the code is consistent (in the---french---army we say: "paumés mais groupés" i.e. "lost but together") you can apply regular expressions processing to the whole because there _are_ rules, if in whatever future the "chief" decides differently... -- Thierry Laronde <tlaronde +AT+ polynum +dot+ com> http://www.kergis.com/ http://www.sbfa.fr/ Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C