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

-9

u/MarcoGreek Mar 18 '26

There are so many different ways to ship your binaries in a container like Flatpak, docker, podman, toolbox etc..

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.

→ More replies

2

u/pjmlp Mar 18 '26

How do you do that in z/OS?

2

u/MarcoGreek Mar 18 '26

Do we spoke about RHEL? Is IBM not making big commercials for container on z/OS? But actually I never deployed there.

1

u/pjmlp Mar 18 '26

Sure if want to deploy on z/OS UNIX environment, instead of classic z/OS language environment.

And it was only one example, I can come up with others that we have customers on.

2

u/MarcoGreek Mar 18 '26

The question is that this customers are worth the costs.

2

u/MessElectrical7920 Mar 18 '26

If the customer is paying you to deliver your software for z/OS, it‘s probably worth the cost.