Re:The engineer’s engineer: Computer industry luminaries sal...
by int_handler on Friday April 15, 2016 @09:44PM
(#11508892)
I also used to work at Microsoft. CNF was primarily used in the kernel and driver code but rarely in userland code, with the exception of certain tools that were developed and maintained by the kernel team (such as powercfg.exe). CNF was one of the few coding styles at Microsoft that I really enjoyed using due to how clean and disciplined it made the code. I felt that the style really reflected Dave Cutler's attention to detail and quality.
You can see more examples of CNF in the now open-sourced Windows-Driver-Frameworks: https://github.com/Microsoft/Windows-Driver-Frameworks
Re:The engineer’s engineer: Computer industry luminaries sal...
by trentnelson on Sunday April 17, 2016 @07:43PM
(#11516892)
I've recently adopted CNF for Windows-based C work and I absolutely love it.
Regarding placement of curly braces, did you see them on their own line or at the end? This article seems to imply that CNF had braces at the end: https://blogs.msdn.microsoft.com/peterwie/2008/02/04/pedanti...
I'm interested because it seems that lower-level systems programming at Microsoft put braces at the end (early .NET BCL, maybe even the first C# compiler's C++ code, TypeScript compiler source, etc), but that Microsoft documentation tended to put braces on their own line and then that became the more de-facto style that shows up in their open source code.