namespaces or static classes ?? you decide
In a book i'm reading about C++ software programming called :
Large-Scale C++ Software Design
The author does not utilize namespaces at all specially that he is taking about how to use C++ for extensive, large projects
instead, he uses static classes like this:
Code:
class HussainLib
{
HussainLib(); //no class instantiation meant
//functions
public:
static void bubble_sort(int* list, int size);
static void arithmetic(int x, int y, int arith);
//blah blah blah
//data
public:
static const double PI();
static const double e();
//blah blah blah
};
and of course you would call them like this:
Code:
const double PI = HussainLib::PI()
what do you think? is it more practical than namespaces ?
I find it a very good way to hide data and functions for programmers working together