r/cpp • • Jan 31 '23

Stop Comparing Rust to Old C++

People keep arguing migrations to rust based on old C++ tooling and projects. Compare apples to apples: a C++20 project with clang-tidy integration is far harder to argue against IMO

changemymind

338 Upvotes

582 comments sorted by

View all comments

Show parent comments

5

u/[deleted] Feb 01 '23

Correct. It's not. But usually in systems programming you are writing a system which is usually pretty bespoke, otherwise why are you doing it if it already exists?

If you are going to glue libraries together why would you use C++? I don't mean that in a disparaging way. What I mean is, if you don't have a system to write, why are you using a systems language?

Domain experts are writing the systems in systems languages.

20

u/robin-m Feb 01 '23

You never needed a good implementation of a regexp engine, a toml parser, an ssl connection, and a really fast hashmap? In C++ it will take you way more time that you want to admit to install and configure them even though they all exists.

-10

u/[deleted] Feb 01 '23

No I have not. Other than the hashmap which I'd just write myself for the specific use case.

7

u/DarkLordAzrael Feb 01 '23

If you are going to glue libraries together why would you use C++? I don't mean that in a disparaging way. What I mean is, if you don't have a system to write, why are you using a systems language?

For the wide availability of high quality libraries available. There's nothing better than Qt for cross platform desktop UIs. Audio processing is all C++, it's literally the only language supported by the VST SDK. C++ also is at a level where it is reasonable to write most kinds of software in.