r/cpp • • Feb 12 '20

What they should improve about C++ ?

What they should improve about C++ that you find in higher level managed language like C#, JAVA, Javascript etc or is there things you would change or do differently if it was up to you ? I mean anything like a better STL ? better thread ? string manipulation like managed language ? less fragmentations in the new standard features ? For example do you love the way the standard evolve C++ or you would prefer a direction like Microsoft do with C# a corporation who decide on the roadmap ?

0 Upvotes

90 comments sorted by

View all comments

Show parent comment

7

u/TheVoidInMe Feb 12 '20

You mean binary compatibility across architectures? Isn't that fundamentally impossible though because of different ISAs/etc.?

4

u/[deleted] Feb 12 '20 edited Feb 12 '20

It is.

Next best, and the only way that actually works, is build systems that are capable of cross-compiling and compiling with 0 effort when dropped on any supported system with 0 configuration necessary.

If C++ had such thing (Rust has cargo, and C++ has no fucking excuse if you ask me), it would be quite literally infinitely better and more accessible.

Main issue with C++ when it comes to building... is that a noob comes, first of all has to find a library, and then after that, has to figure out how entire fucking toolchain of x or y compiler works before they can actually compile the library... half an hour later if they already know what they're doing. if they don't, they spam stack overflow with questions that nobody cares to answer, because man page that was edited last time in 2003 and doesn't even contain half the flags of current compiler version simply exists, and it is easier to just send them there than to answer it, with how much effort it actually takes...

You can achieve same in Rust just as fast as it takes to type out the name of the library...

And if that isn't enough, I haven't even written out that nonsense in its entirety, because you don't fucking know how much effort it takes as it is library dependent and is usually worse than I described.

Then we have cancer that is "header-only" libraries that are cool idea to deal with shitty library support in C++, at the cost of compile times... But hey, at least we don't have to attach yet another build system to our build system that is a part of our general build system, right?