Programming Standards
For the most part, all code should be written in C
unless there is a
burning reason to use C++
, and then only the simplest C++
constructs will be used. Note, Bacula is slowly evolving to use more and
more C++
.
Code should have some documentation – not a lot, but enough so that I can understand it. Look at the current code, and you will see that I document more than most, but am definitely not a fanatic.
We prefer simple linear code where possible. Gotos are strongly discouraged except for handling an error to either bail out or to retry some code, and such use of gotos can vastly simplify the program.
Remember this is a C
program that is migrating to a tiny subset
of C++
, so be conservative in your use of C++
features.
Possible Next Steps
Go to What Not to Use.
Go back to Developer Notes.
Go back to Developer Guide.