3 ms·
One reason. The other is C is easy. Any language can implement it and have confidence it can work. (there are other options that are just as easy, but C won)
by bluGill 3mo ago
One reason. The other is C is easy. Any language can implement it and have confidence it can work. (there are other options that are just as easy, but C won). C++ is much harder because of things like function overloading and exceptions - none of it is difficult, but there is a lot more to do and thus more opportunities for bugs.
- mohamedkoubaa 3mo agoI would go far as to say that modern C++ is an Eldritch horror of a programming experience
- pjmlp 3mo agoUnfortunately no one is going to rewrite LLVM, GCC, CUDA, DirectX, Metal, SYSCL, V8,... into something else. Same applies to C and UNIX/POSIX, OpenGL/Vulkan/OpenCL/NVN/LibGNM(X),... Thus analysers and language subsetting tools, enforcing language style guides and safer coding practices.
- rramadass 3mo agoOh come on; that is BS and you know it. It is complex/complicated/baroque but for the power, flexibility, real-world-usage that it provides it is worth the effort. The mistake that people make is to try and learn it all at the same time which overwhelms them. Use a good book like Discovering Modern C++: An Intensive Course for Scientists, Engineers, and Programmers by Peter Gottschling and you should have no problem at all.
- mohamedkoubaa 3mo agoFor context: I have over a decade of professional experience with c++ in large scale software projects and it is by far the language over which I have the most mastery.
- rramadass 3mo agoAnd yet you make such statements ;-) I often see on HN these sorts of comments whenever C++ is brought up and it really needs to stop. It is wrong, adds no value to the discussion and does a grave injustice to the programming community. We should be encouraging programmers to learn C/C++ since just knowing those two languages enables one to program MCU/embedded/desktop/server machines across all layers of software from apps/scientific software/OS/system software/bare-metal in the real-world. One can imagine the job opportunities for a programmer with such a skillset as market needs change. With both Hardware and Software evolving so rapidly nowadays, C/C++ are the one constant interface language in the industry.
- mohamedkoubaa 3mo agoI would encourage programmers to learn c++ because it's important, but I'll never lie about what it's like to actually use it
- rramadass 3mo agoYou don't have to lie or play-up/play-down the language; just say it as it is with no painting of dragons and fear-mongering. It is just another language and not rocket science.
- uecker 3mo agoEasy and still expressive, so you can map many things to C. And while the language standard does not define an ABI it takes a lot of care not to require any ABI break.