by worik · 4y ago · 0 comments
Legacy projects (I am not being pejorative, they are important) which must be maintained aside, should not C++ be deprecated?
We have many new languages, we always had C. What does C++ give us in 2022 that makes up for the enormous cognitive load of understanding and keeping up with it.
That said while I used to use C++ for nearly everything, these days I use Elixir for app dev whenever I can, and Ruby and bash for scripts. However if I were going to write a desktop app today I'd most likely go for C++ so I could use Qt. I do really need to try out new GTK though, sounds like it's gotten really great.
Rust is not "displacing" C++ anywhere beyond the HN echo chamber.
In your sample of C++ people, is there much interest in functional programming?
As for what do you get? Well, compared to C you can get higher programmer productivity and compared to any language other than C, you get great performance.
The short answer is probably that (unsurprisingly) C still does not scratch the particular itches that C++ was created for, and non of the new languages hit all of them well either. Plus network effect.
- I've been using C/C++ since my first year of undergrad so I'm already familiar/comfortable with it
- Java has too much boilerplate (my mind is still stuck in Java 8 so maybe things have changed since then)
- I found myself spending more time fighting the Rust/Go compiler than actually solving my problems
- I don't want to package a web browser for a simple 1-2 UI application
Generics is an absolutely must have. In 1997 I was was giving up on C++ when I discovered the standard template library. I was lucky to be using Visual C++ on Microsoft. The (only) good thing good thing about that compiler is it implemented the STL using Stepinov's reference.
Stepanov defined STL in 1994. By 1997 there were SFA implementations that followed the standard. Most "improved" it and made a mess of it, like GCC.
(I may have remembered that wrong, mēh)
It completely changed the way I thought about computer programming. Before that I was always programming in a style suited to assembly programming
If I were starting a greenfield project today, I might choose C++ for it, depending on what it was. (Pick the best tool for the job, and all that.) But if I picked C++, I would not use the full enormity of the entire C++ language specification. I would use the parts that helped with the program I was trying to write, and explicitly not use the rest of it.