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.

191 Upvotes

100 comments sorted by

View all comments

Show parent comment

8

u/OlivierTwist Mar 18 '26

My message contains enough information to understand that all what you have mentioned is absolutely irrelevant.

-1

u/MarcoGreek Mar 18 '26

We had a similar problem and Flatpak solved it in our case. Is you program only depending on glibc? So it is not C++?

7

u/yuri-kilochek Mar 18 '26

He's shipping compiled dynamic libraries with headers, containers are irrelevant.

-3

u/MarcoGreek Mar 18 '26

But then he can make a LTS version for customers who don't want to move to a new platform.

5

u/OlivierTwist Mar 18 '26

You didn't have a similar problem, because Flatpak is irrelevant for shared libraries and headers.

Please check what glibc is.

3

u/MarcoGreek Mar 18 '26

I mean our solution was Flatpak. We shipped binaries before and had all that symbol problems.

2

u/OlivierTwist Mar 18 '26

How does Flatpak help if your dynamic library should be used by another dynamic library?

1

u/MarcoGreek Mar 18 '26

So no application is using your dynamic library?

2

u/OlivierTwist Mar 18 '26

Library is used by app or lib, doesn't matter. What matters is that library users are bound to some old gcc for whatever reason.

2

u/MarcoGreek Mar 18 '26

Yes, but that leads other potential customers to avoid that library. It is a trade-off.

1

u/OlivierTwist Mar 18 '26

You know, C++ is backward compatible, so exactly zero people care if public headers are C++17 or C++26.

As long as headers can be used on a target system everyone is happy.

3

u/Conscious_Support176 Mar 19 '26

That’s an interesting argument. Customers won’t care if you’re using C89 either, right?

→ More replies