New answers tagged

2 votes

Is there any reason not to use classes in C++?

The other answers here are great, but I wanted to add my two cents. Classes in C++ offer quite a few conveniences, other answers here mentioned ...
Tom Tsagkatos's user avatar
1 vote

Is there any reason not to use classes in C++?

C++ is a huge language, and there can be reasons not to use particular feature, and lots of argument about which features should be used. For instance, if you use polymorphism, you are paying a small ...
MadMan's user avatar
  • 743
2 votes

Is there any reason not to use classes in C++?

Good question. First what role do classes serve? No seriously, why do we use classes? Some might say thtat it is to bundle related bits of data together... Such as a rectangle has a location, a width, ...
Questor's user avatar
  • 171
5 votes
Accepted

Programming Singletons vs Static classes

In Game Programming Patterns, Robert Nystrom lays out that there's a few common reasons we like to reach for singletons: Ease of global access Only takes resources if used (if no one uses the ...
DMGregory's user avatar
  • 134k

Top 50 recent answers are included