4 ms·
Yet, 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
by pkolaczk 13y ago
Yet, 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.