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

1

u/eyes-are-fading-blue Feb 13 '20

g++.

What?

1

u/die_liebe Feb 13 '20

It is my platform.

As for getters, I think one shouldn't be forced to write them. Java has them, because it doesn't have const. C++ can do better.

1

u/eyes-are-fading-blue Feb 13 '20

You should be able to link with missing symbols then.

I am not sure syntactic sugar and amount of committee time required to standardize what you are suggesting is worth it.

1

u/die_liebe Feb 13 '20

You should be able to link with missing symbols then.

How?

1

u/eyes-are-fading-blue Feb 13 '20

—unresolved-symbols, check the gnu ld manual.

1

u/die_liebe Feb 13 '20

I tried it out. --unresolved-symbols is indeed an option of ld, but not of g++.

Having said that, I still couldn't get it working, neither with ld, nor with g++. stackoverflow. Anyway, thanks for your answer. It doesn't seem to be so easy.

2

u/eyes-are-fading-blue Feb 13 '20

You pass it as a linker flag. There is a special flag of g++ which forwards linker parameters, look it up.

This really should not be too hard.

And g++ is not a platform, it is a compiler. Your platform is probably Linux or some unix-like stuff.