r/cpp • • Mar 18 '26

What open source projects in C++ have the highest code quality?

My understanding of the characteristics of quality code are the conventional ones.

  • operations on an object that are allowed in a particular object state do not put the object into an invalid state.
  • it's prioritized to organize the implementation of each object into the smallest possible number of sub-objects.
  • no cryptically abbreviated names are used, except possible in very small scopes.

    With the program(s)/executable(s) themselves, as well as modules with corresponding namespaces, being considered singleton objects.

Fair dinkum if you want to name projects that score well under a different understanding of code quality.

190 Upvotes

100 comments sorted by

View all comments

Show parent comment

2

u/MarcoGreek Mar 18 '26

The question is if that customers are worth the costs. My experience is that some of them go out of business. There is always a balance between future customers and legacy customers.

4

u/pjmlp Mar 18 '26

So far yes, they are worth it, especially in times like these, where every single custormer counts to keep the employees around.

3

u/MarcoGreek Mar 18 '26

But if your solution looks outdated to other customers because you lean to heavily on conservative customers it can hurt too. Especially in the future.

4

u/ShoePillow Mar 19 '26

The compiler choice has no effect on how the solution looks though 

1

u/MarcoGreek Mar 19 '26

I like to see how you emulate variadic arguments. I suppose that without ranges your interface can look different. And supporting serialization without reflection will be interesting.

2

u/ShoePillow Mar 19 '26

Ok, but I was thinking about the solution from the customer's perspective. For them, these things won't matter

1

u/MarcoGreek Mar 19 '26

I spoke about the interface from the customer perspective. I work with C++ 17 libraries and you can feel it. No support for std::format. They invented their own span. There are many small things.

And for serialization look at Glaze. They now support reflections which saves you quite some boilerplate code.