Code Management: Difference between revisions

removed a sentence stating that var++ and ++var are the same
[unchecked revision][unchecked revision]
m (Add to OS Development category)
(removed a sentence stating that var++ and ++var are the same)
Line 9:
Perhaps the most essential thing to define is the naming convention (that is, how functions, structures, types, macros, variables etc. are named) in the interface (see [[#Interfaces, Implementations, and Black Boxes|Interfaces, Implementations and Black Boxes]] below for more details). This is less important for internal (e.g. ''static'' in C) functions which are not exposed, though it's good practice to keep the same standards everywhere.
 
The last concern is the method that is used to accomplish certain tasks that are used in multiple places across the OS. For example, the C language allows two syntaxes for incrementing the value of a variable which are equivalent (''var++'' and ''++var''), and the C++ language allows two ways toof allocateallocating memory (''new'' and the C standard ''malloc''). A good project has well-defined conventions that are followed throughout the project.
 
Fortunately, with the evolution of modern IDEs, following the coding conventions of a project has become a simple matter of setting up te IDE to use the correct encoding/tab policy/headers, and using the IDE's automated source formatting utilities to produce correctly formatted source files. Some IDEs can even create the heading comment block directly at the start of each source file you create, so that you only have to fill in the gaps.
Anonymous user