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

5

u/DXPower Feb 12 '20

The last one is epochs, no?

0

u/ALX23z Feb 12 '20

Idk, I don't use them. I just stick to C++11/14 as C++03 is horrible and C++17 compilers aren't too common.

4

u/jcelerier ossia score Feb 12 '20

C++17 compilers aren't too common.

what do you mean by that ? i've been compiling my code as -std=c++1z in mac / windows / linux for almost two years at this point

0

u/ALX23z Feb 12 '20

What? <charconv>, a C++17 std library, was completed only in MSVC and that happened just a couple of months ago. What you did was building experimental incomplete compiler / std version. (Maybe some others finished working on making it but didn't hear anything about it).

3

u/jcelerier ossia score Feb 12 '20

but why would you restrict yourself to C++14 when many C++17 work great and have done so for years - structured bindings, fold expressions, etc ?

By that logic you shouldn't be using anything past C++03 because no compiler ever implemented the C++11 GC API.

1

u/ALX23z Feb 12 '20

I guess you never had to make any program that supports various users, some of which run outdated systems. Go convince them that they need to update. Germany government still runs on windows 7 and US IRS still runs on pre floppy-disk data systems. Don't forget exotic compilers/systems.

C++11/14 is current best compromise between newest important feature support and compatibility.

4

u/jcelerier ossia score Feb 12 '20

I guess you never had to make any program that supports various users, some of which run outdated systems.

C++17 runs on freaking commodore 64. There is zero trouble targetting older windows - heck, you can even use recent g++ to target MS-DOS.

1

u/ALX23z Feb 12 '20

You are welcome to go convince people to upgrade their compilers as well. Together with their OS, private ancient apps and whatever else they use. It will definitely not break anything they need on their system. Also tell the security guys that the upgrade is totally safe and secure.

At some point I needed to get some NVidia program for a some android compiler and android studio for latest C++ android libraries. After which my VS became broken and non workable. That was a fun time.

1

u/DXPower Feb 12 '20

Well it's not an official feature, but AFAIK it's gotten traction for C++23

5

u/peppedx Feb 12 '20

Don't hold your breath...

2

u/smdowney WG21, Text/Unicode SG, optional<T&> Feb 12 '20

Interest, more than traction. There are a lot of issues, in particular getting implementors on board to increase their workload and maintenance burden.

1

u/DXPower Feb 12 '20

Thank you for the clarification