5 ms·
> C++ will always have a place because it's a language that literally has (or will have) everything. I don't think that's true at this stage. Nowadays, beyond
by geezerjay 8y ago
> C++ will always have a place because it's a language that literally has (or will have) everything.
I don't think that's true at this stage. Nowadays, beyond legacy code, C++ is used mainly in embedded, number-crunching, and cross-platform GUI applicationd, and that's about it. Meanwhile the world has moved on to web services and web apps, where C++ is nowhere to be seen, and other competing lower-level programming languages are starting to eat away C++'s lunch.
- brobdingnagians 8y agoDon't forget high performance games; which is a huge market, highly complex, and very competitive.
- ahartmetz 8y agoC++ (Rust as well) is for high complexity problems that need high performance solutions. It's not just a few narrow application areas. For example, all major HTML and JS engines are also written in C++. I wouldn't call them (just) GUI applications. I bet that all offline renderers for professional CGI are also C++.
- pjmlp 8y agoMost of my work is done in Java, .NET and JavaScript, C++ is the only native alternative that I can easily plug into all of them when I need native interop. Go is not an option until they get their story straight with 2.0. Swift is nice, but really it will never go beyond being an Apple platform language. Native/Kotlin is doing its baby steps. D seemed like a nice alternative, but they are such a small community without any big corporation support, that the language might already have lost its opportunity. Rust would be the best alternative, but it still lacks the tooling integration story regarding IDE, graphical debuggers and OS vendors support. Yes, no one is doing pure apps anymore in 100% C++, Java and .NET are slowly migrating to bootstrapped runtimes, but the language is not going away for the foreseeable future. Kids are learning to program on Arduino devices using C++. Microsoft already has some ongoing Rust projects, but Visual Rust is not yet here. AAA Games, compilers specially LLVM and GCC, OS, HPC, Fintech, deep learning, GPGPU shaders, GUI composition engines, IoT, medical devices, car infotainment systems, VFX software might be a niche, but it is a very big niche. One of the good things about polyglot development is that one doesn't need to silo himself/herself as developer X and be worried if language X is suitable for full stack development across all domains of computing. EDIT: typos
- therockhead 8y ago> Go is not an option until they get their story straight with 2.0 Would you mind expanding on this point? Where I work, we do lot of C++ for the reasons you described but I have started to learn Go to see if its a suitable replacement.
- pjmlp 8y agoFrom my point of view, no generics, error handling boilerplate, no real enums (although there is a kind of workaround). There are other issues regarding tooling, specially for the use cases that I care, like dynamic loading into other platforms (JVM and .NET), GPU programming and graphical debuggers. So naturally many C++ dev did not felt at home with Go. https://commandcenter.blogspot.com/2012/06/less-is-exponentially-more.html https://commandcenter.blogspot.com/2012/06/less-is-exponenti... Those pain points are the biggest roadmap points on a possible 2.0 version. https://blog.golang.org/go2draft https://blog.golang.org/go2draft
- snowAbstraction 8y agoI agree with you except that there is sizable chunk of back-end code that is using C++ or at least calling it.
- bayindirh 8y agoIt's already written, but things require absolute efficiency and high performance, like HPC and ML cannot be done without C++. I develop some HPC code, and most of them is infeasible without C++. Other languages' high performance libraries PIL and numPy is written with C & C++.
- pjmlp 8y agoNVidia GPUs are now designed explicitly for running C++ code efficiently. CppCon 2017: Olivier Giroux "Designing (New) C++ Hardware” https://www.youtube.com/watch?v=86seb-iZCnI https://www.youtube.com/watch?v=86seb-iZCnI Assuming another systems language, e.g. Rust, does indeed replace C++'s use cases, it is still a very long path until it gets this adoption level from hardware vendors.
- EpicEng 8y ago>C++ is used mainly in embedded, number-crunching, and cross-platform GUI You forgot a couple: your OS, your web server, image and video codecs, and basically any other low-ish level abstraction you rely on. The world isn't built on web apps.