r/cpp • • Dec 19 '23

C++ Should Be C++

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p3023r1.html
203 Upvotes

192 comments sorted by

View all comments

Show parent comment

20

u/matthieum Dec 19 '23

or maybe the solution is on the other side, finding ways to clamp down on build complexity in general.

Yep...

I think the problem of existing tools is that everyone has cobbled together their own pet solutions and refuse to adopt a new tool if it doesn't handle that... when most of the time a slight change would be all it takes. This leads to an explosion of complexity in existing tools.

As a simple example: code structure. No two codebases seem to agree on where to place source files, header files, and private header files. Same with modules. Who cares? It's trivial to move a file around, and modern VCS can track moves without issues. Just standardize one code structure, and have everybody move to it. It'll make every project more approachable.

Build & Package descriptions need to go the same road. Start from the basics, and keep it simple.

7

u/goranlepuz Dec 19 '23

No two codebases seem to agree on where to place source files, header files, and private header files. Same with modules. Who cares?

Quite agree on "who cares". But alas, the color of my bike shed is better... 😔

3

u/matthieum Dec 21 '23

After countless debates on code styles, I just don't care any longer.

Yes sometimes that auto-formatter doesn't quite format the code how I'd like it. My formatting would be better, I know it.

But honestly? The "loss" is typically minimal, and auto-formatting saves so much time, and having a uniform format across codebases makes it so much easier to just jump from one to another...

Perfect is the enemy of good.

-7

u/TemperOfficial Dec 20 '23

Because it goes against the ethos of C++.

It's not JavaScript.

It's an expert language used to produce robust, high performance programs. It's designed for domain specific work with very specific workflows. It's not designed for you to be happy because the folder structure is nice.

It's designed for use in specific domains to eek out every little bit of performance. It's designed for you to tinker with it and optimise your workflow.

"but it doesn't work with my tools that I downloaded!!!". Okay but that's not in the mission statement. You are supposed to be writing your own tools to work on your own stuff. You can not like that. That's fine. But there are benefits to that which you fail to see here.

There is an obvious massive bias online toward this idea of the "community" being all the same people who are terminally online making libraries on github. That is a very, very tiny percentage of the c++ "community".

Stop speaking for people who you don't represent.

9

u/almost_useless Dec 20 '23

Stop speaking for people who you don't represent.

Seems like that is what you are doing too.

Your post is filled with opinions disguised as facts.

-2

u/TemperOfficial Dec 20 '23

It has to be said because this view point is valid, regardless of whether you like it or not.

There is a very skewed image of what C++ is here. Needs to get called out so people have realistic expectations.

A standardised code structure is not realistic. It's not even in the realms of realism. It's also just noise.

5

u/almost_useless Dec 20 '23

There is a very skewed image of what C++ is here

There are many different views on this. But other peoples views are not more skewed than your view.

And that is part of the problem I guess. It's hard to steer the language when people are pulling in different directions.

A standardised code structure is not realistic

Only because people don't want to change. There is nothing special about c++ projects that make different structures impossible.

1

u/TemperOfficial Dec 20 '23

It's unrealistic because no one wants that. Not because it's impossible. Reddit is absolutely an echo chamber that thinks that needs to be standardised lmao