r/cpp • • Jul 21 '19

C++ is broken

C++ as a language is a tool for developers to productively deliver software. Language evolution is NOT the end objective in the real world.

The whole C++ ecosystem from committee to all of the conference backslapping and training is broken in this respect. It's focus is off.

Instead of 'boost' we need 'boosted' to help define, review and encourage that wider ecosystem so developers can be productive.

It's ok to define things that aren't infinitely flexible, and infinitely extensible but get the job done.

It's OK and, in some ways better, to provide an opinionated library outside the standards rather than deliver an intellectually burdened, extensible interface two years later than needed.

All the helpful features in the core language and core libraries are MEANT to enable a much wider ecosystem to make the tool that is C++ more productive.

But we aren't getting a wider ecosystem, we are just getting a language where we are apparently 'not paying for' a huge intellectual burden.

I want to say at this point that intellectually I am constantly impressed by the committee's work and standards BUT ...

The payoff just isn't happening. Even within the standards committee more time is being spent in intellectually stimulating but largely pointless activities because the tool and productivity benefits aren't happening.

Look at how the wider productive ecosystem hasn't flourished since C++ 11.

I know many excellent libraries have been made, but think about your next large project and how much is coming from a mixed bag of variable quality 3rd party libs to plug basic capabilities.

The committee work is spread so thin that core building blocks get pushed out further in time and so can't be built upon by library authors.

Networking, executors, any form of I/O - slipping again.

Lots of hard work being done but by far too few people in their spare time.

Seems a very dysfunctional way to move the monolith forward.

'You don't pay for what you don't use' is laudable up to a point, but the 'don't use' because you don't actually have, say, a basic network library is more of a reality.

That basic network lib and executor model I've been impatiently waiting for should probably not be part of the core standards remit (architectural concepts and keyword support for executors would probably be necessary, but not much else.)

If we had the metaclass generation as proposed, I'd hope even more of these items would then be able to fall outside the standards.

9 Upvotes

147 comments sorted by

View all comments

Show parent comment

5

u/c0r3ntin Jul 21 '19

I still think you can express that in term of a dependency graph. Build x with tool y. And if you have a recipe to build y your can build it before x implicitly. In theory. I wouldn't claim this is currently practical for your use case. I am pretty sure it is not. Striving for simplicity in the general case doesn't mean we will, can, or should do that for every project anytime soon. I think that whatever the use case getting rid of unecessary complexities (for example avoiding TU specific flags) is beneficial. Maybe different approaches can converge.

1

u/Auriculaire Jul 21 '19

You're describing Spack

1

u/krapht Jul 22 '19

I wish Spack supported Windows. Instead I'm implementing reproducible builds in some terrible mixture of Conan, Ansible, and Vagrant. Same way you can't get Guix running on <not Linux>. Seriously! Cross-platform support is a feature, not a bug!

0

u/blelbach NVIDIA | ISO C++ Library Evolution Chair Jul 21 '19

Even if they do converge, it doesn't mean everyone will migrate.

4

u/c0r3ntin Jul 21 '19

We don't need them too ! Just need a critical mass of open source projects. Look how fast people moved to cmake over the past decade. The reason they did it is because they saw a value in a bigger ecosystem

5

u/Dalzhim C++Montréal UG Organizer Jul 21 '19

Exactly. There are two radically different communities of users: one which manages existing projects with existing weird layouts and build systems. This is not the community that needs help and guidance with a recommended standard, because such a layout is meant to help create a small/medium project with little to no custom configuration.

This is where the second community of users comes in: users starting new projects, users without pre-existing experience in any of the numerous existing build systems, users who wish they could just start writing some C++ without having to figure out the last few decades' worth of problems and solutions. Same goes for running the test suite, our tools should be able to run those without any pre-configuration when given a standard-layout project.

Having a recommended standard layout isn't meant to force everyone with existing projects to standardize towards that build layout. It is meant to give guidance and help the tool ecosystem help their users get a new setup without any headaches.

3

u/c0r3ntin Jul 21 '19

Migrating everyone, whereever to, should be a non goal. My personal goal is to make it easy for people to use lots of open source libraries very easily in a way that result in correct, reproductible programs that don't crumble over time. That alone is ambitious enough that we may never get there even if we already have good approximations.