4 ms·
For the sake of balance, here is Yossi Kreinin's list of things that are wrong with C++: http://yosefk.com/c++fqa/defective.html http://yosefk.com/c++fqa/defect
by azov 13y ago
For the sake of balance, here is Yossi Kreinin's list of things that are wrong with C++: http://yosefk.com/c++fqa/defective.html http://yosefk.com/c++fqa/defective.html
PS. One of my biggest gripes with C++ is the lack of uniformity. Not only the language itself has insane learning curve, every project does so many trivial and not-so-trivial things differently that it's like learning another language each time you dive into a new codebase. From code formatting, documentation, and source tree layout to error handling, libraries and build system - for something so huge and complicated as C++ there's an amazing number of batteries not included. Even the things that are supposed to be standard in theory are often not so in practice. Damn, there's still custom string classes in the APIs of many popular libraries - almost two decades after std::string and STL!
PPS. And yes, there's a difference between having consistent conventions and trying to be perfect for everybody and everything.
- stinos 13y agoor as bjarne points out in the article There can be no programming language that is perfect for everybody and for everything. C++ doesn’t try to be everything for everybody, but it is rather good at the tasks for which it was designed – mostly systems programming, software infrastructure, and resource-constrained applications and Don’t just say “I want a GUI library” or “there is no proper support for task-based concurrency” or whatever. We know that.
- pkolaczk 13y agoYet, most operating systems have been written in pure C, resource constrained applications are still being written mostly in pure C or eventually C with classes (and mobile apps are not resource constrained apps anymore), and enterprise software infrastructure is written in a wide range of languages ranging from C, through Java to even Python. What C++ is mostly used for are games and desktop GUIs... :D
- cageface 13y agoWhat C++ is mostly used for are games and desktop GUIs... Hardly. Just about every interesting native application is written in C++. Chrome, Photoshop, Cubase, Ableton Live, AutoCad, Java, V8, any AAA video game, etc. Whether you like C++ or not the fact remains that if you want to write an application of any complexity that really pushes the hardware it's just about your only reasonable choice. Maybe people still write kernels in C but kernels really aren't that complex compared to the applications they run.
- pkolaczk 13y agoYou listed mostly desktop apps and games = exactly what I said. And even in this area, C++ is not used exclusively - see Minecraft (Java), Azureus (Java), Gimp (C), VisualStudio (new code mostly C#). So no, not every. BTW: There are many interesting and successful complex applications really pushing the hardware that were not written in C++: Cassandra (Java), Hadoop (Java), PostgreSQL (C), Netty (Java), Nginx (C), TeX/LaTeX (uh, this one is really interesting). So, again, C++ is not the only reasonable choice when performance matters.
- deleted 13y ago[deleted]
- cageface 13y agoScaling across multiple machines is a completely different problem than pushing a single machine to the limit, with completely different constraints. Once you move beyond a single CPU and you can tolerate higher latency then languages like Java start to become more viable. When you need maximum performance and minimal latency from a single machine C++ is still the first choice and the number of high-performance apps written in C++ vastly outnumbers those written in C. Check high frequency trading for another example.
- pkolaczk 13y agoThere are companies doing HFT with reatlime Java and custom hardware. Sure, C++ has its place there, too, but again: not the only viable option.
- huhtenberg 13y agoThe fact that this list has been around for a while doesn't make any less inaccurate and massively biased. That's basically a milder version of that "Indian Programmer Competency Matrix" - both are notable for how frequently they are plugged into conversations and not for their actual content. [0] http://sijinjoseph.com/programmer-competency-matrix/ http://sijinjoseph.com/programmer-competency-matrix/