It looks weird, but it actually makes sense! The flow is more natural - first the function definition, and then the explanation of what it does. It also avoids repeating the function name.
It looks weird, but it actually makes sense! The flow is more natural - first the function definition, and then the explanation of what it does. It also avoids repeating the function name.
So it came up in an era where folks were inventing their own style and the huge homogenizing influence of the gnu standards (and other open source projects) hadn't taken hold.
I like it. It feels like another language, and has its advantages. I really like to know of alternate ways of doing things, even if I don't adopt them myself.
I think Indian Hill (C, not C++) was the first one I ever read: https://www2.cs.arizona.edu/~mccann/cstyle.html
Looks like there is an updated version (1997) here: https://www.cs.cornell.edu/people/egs/comp303/tutorials/csty...
Paul Haeberli's "The SGI C Source Compliance Requirements" is hard to forget: https://www.graficaobscura.com/ccode/index.html
I wonder whether there is a centralised historical archive of C/C++ style guides?
The modern staples are covered here, I guess:
void func(var1, var2) int var1, char* var2. { ... }
perhaps some legacy from that? Probably not, but just first thing that popped into my head since it feels similar :shrug:
(Using FORTRAN here rather than the more correct Fortran to denote the traditional pre-modern (Fortran 90+) programming style.)