next up previous contents
Next: Debugging Up: Software Development and Coding Previous: Do not Be Too   Contents

Namespaces

Do not prefix your class, method, or variable names with a concocted abbreviation that uniquely identifies your code. Use name spaces to make your classes and functions unique.


27#27

Should be changed to:


28#28

To use the namespace you can either place using namespace MyLib at the top of each file you use the namespace's members in or use the namespace selectively: MyLib::magnitude(v) very similar to accessing a public static member function in a class. The use of namespace clarify code and reduce a lot of extra typing.



Falko Kuester 2001-08-24