Get the latest tech news

C Style: My favorite C programming practices (2014)


My favorite C programming practices. Contribute to mcinglis/c-style development by creating an account on GitHub.

Unified headers are generally bad, because they relieve the library developer of the responsibility to provide loosely-coupled modules clearly separated by their purpose and abstraction. If the function name is a predicate, like is_adult or in_tree, and will read naturally in a conditional context, then I think it's alright to skip assigning its result. I know I'd much prefer my constant values to be protected by explicit, syntactic constructs that will warn when compiling, rather than implicit, obscure rules that will seg-fault when violated.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Style

Style

Related news:

News photo

Georgia rocked by protests as government pushes Putin-style 'foreign agent' bill

News photo

Disney+ may add cable-style streaming channels focused on Marvel and Star Wars

News photo

Mind-blowing science: ‘Star Wars-style’ holograms to communicate with the brain