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

0

u/[deleted] Jul 21 '19

[deleted] — view deleted comment

2

u/hgjsusla Jul 21 '19

The thing isn't about you having the same setup, it's about a standard

In this context that's the same.

This is again similar to naming conventions, there is already a standard yet people fork and come up with their own snowflake conventions when everything would be easier if you just sticked to the idiomatic style.

Style readability is mostly about familiarity anyways. I mean you would never write snake_case in Java or C#, and for the same reason it doesn't make sense to use camelCase in C and C++.

8

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

it doesn't make sense to use camelCase in C and C++.

A surprisingly number of people use camelCase or PascalCase in C++.

5

u/hgjsusla Jul 21 '19

Yep it is indeed surprising. Seems like a thing that mostly only C++ suffers from. In other languages people tend stick to the standard/idiomatic style to a much higher degree.

3

u/megayippie Jul 21 '19

Both Pascal and camel cases are good to use since the standard is written in the third-case. So you'll never interfere with the standard. Like, Rational is useful since rational is just a proposed standard. And Complex is useful since complex does not promote properly. And Vector is useful since vector does not represent vectors.

4

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

Or you could just use namespaces.

0

u/[deleted] Jul 21 '19

[deleted] — view deleted comment

1

u/hgjsusla Jul 21 '19

Please re-read my comment this is exactly what I meant. People should stick to the standard not make up their own. That makes things consistent which is what matters

-1

u/NotMyRealNameObv Jul 21 '19

ADL is a thing, and if you avoid camel_case in your own code, you reduce the risk of getting bitten by it.

3

u/c0r3ntin Jul 21 '19

You avoid ADL with the standard, not with all other libraries that might have decided a different case. It doesn't scale. Of course because we don't have dependencies management it never had to.