Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Software engineering question

Name: Anonymous 2006-04-02 22:43

And it's not about Java (necessarily).

Does it ever make sense to create a class that consists only of member functions and has no member variables? Basically, a class that exists just to physically group functions that share a purpose but don't neccessarily operate on the same set of data.

Name: Anonymous 2006-04-03 5:06

>>6
In that case I'll say no. A class consisting entirely of concrete functions and no member variables would never need to be instantiated. You could subclass it to include the functions in your own class, but that's no more or less convenient than using a namespace. In fact using a namespace would be better, because it would avoid multiple inheritance related discomfort.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List