Problem Description
I am wondering what is a best practice for classes that start having too many static functions, but no member variables.
class A {
static void fooA();
static void fooB();
static void fooC();
static void fooD();
...
}
/*
* #include "A.h"
*
* A::fooA(); A::fooB(); A::fooC(); A::fooD();
*
*/
Or
class A {
void fooA() const;
void fooB() const;
void fooC() const;
void fooD() const;
...
};
/*
* #include "A.h"
*
* A a;
* a.fooA(); a.fooB(); a.fooC(); a.fooD();
*
*/
Question
Is it best to just make an instance of the class and access the functions over the instance, or have the static
keyword to all the member functions and access them in a static way?
I am asking this because my class has 8 static functions and it just seems visually weird.