by jayvanguard · 11y ago · 0 comments
First off, that is incorrect. You underestimate the number of VB, C#, and other apps, not to mention OSX based apps. Most business apps are either in Java on the backend or if they aren't web based they are in proprietary languages and frameworks that likely use a mix of C and C++ at the core. They are mostly shit nowadays though which is why everyone is re-writing them in the Cloud. They're unmaintainable.
But yes there are a lot of high visibility popular desktop apps in C++ and yes, it is just inertia. When were all of those desktop apps you're thinking of first built (or came of age)? The early 90s! Microsoft Office, the Adobe suite, Visio (bought out by Microsoft), desktop databases, etc.
That was the age of the desktop and briefly, C++ was the best choice. I'll grant you a few very small niches still exist and they are in the desktop domain e.g. web browsers and very complex image editors. But how many people are writing browsers? And simpler image editors are better off being mostly in Objective-C or C# (minus some core libraries which are best off in C).
I'll grant you a few very small niches still exist and they are in the desktop domain
Show me a popular desktop app written in something other than C++. Even when developers have tried to write a desktop app in something other than C++ (like Evernote on Windows) it was deemed a failure and was re-implemented in C++.
And you still haven't presented a compelling argument for choosing C over C++. C++ IS C, but with extra stuff that makes it better, like generics, custom types, alternatives to C's nuclear-powered casting, strings that don't blow up in your face, etc, etc. Why should a core library only be written in C?
C++ is only used for the COM interfaces used to talk to the measurement devices.
Evernote's case if I remember correctly was mainly caused by them using .NET 3.5 without much knowledge of the eco-system.
WPF in .NET 4.5 is not the same as the Evernote guys used.
I do like C++, but I rather use the safety and tooling of other languages.
Only C++ Builder and now XAML with C++/CX can offer similar capabilities.
EDIT: improved the content.
Qt seems to be going JavaScript gluing C++ components, given that many of the new features are QML only.
Eclipse is the only one that comes to mind.
I'm not sure the state of consumer Windows apps but almost all desktop business apps are in C# or VB. Unless of course they are accessing legacy C++ stuff.
I can give you a few more: Chrome (not entirely new, but still the newest major browser around), Sublime Text (compare its performance with Atom to realize the strengths of C++), GoldenDict, Scan Tailor.
Actually, I've tried thinking of new Desktop apps which came out in the last 5 years and there weren't many. Developing new desktop apps is just not as popular as it used to be 10 years ago. It has a lot to do with the rising prominence of web and mobile apps, but this also has something to do with C++, when I think about it.
Writing a cross-platform web app with acceptable performance is easier than writing a desktop app with the same properties, since you'd almost certainly need to use C++ to get an app with the same properties on the desktop.
With web apps you essentially get cross-platform for free (at least since the days of jQuery and IE shims) and the performance is not stellar, but at least it's not worse than all the other web apps, so it matches your users expectations.
On the desktop, you usually get three routes: 1. C++ app with a cross platform GUI toolkit (probably Qt, since GTK user experience is usually horrible on anything other than *NIX) or an abstraction layer like wxWidgets. 2. Cross-platform Java or Mono/.NET app with cross platform GUI toolkit. There are occasional exceptions, but these apps generally tend to be bloated or hard to install, and never match the snappiness of native apps. 3. Write a separate native front-end for each platform, using its own native GUI toolkit. This usually means C with @WinForms/WPF for Windows and Objective-C with Cocoa for Mac. If you have a shared backend, you would usually still be forced to use C or C++ to make it usable with both runtimes.
These are not "legacy" apps. They are huge cutting-edge professional suites that drive massive chunks of the economy and contain some of the most complex and challenging computer code ever written. We're talking about stuff like Monte Carlo analysis and genetic algorithm generation of physical machines, simulation of massive electronic circuits, etc... some of these things are the closest thing software engineering has to modern wonders of the world.
Go try re-implementing SolidWorks in JavaScript as a client/server app or for Android or iOS and then tell me desktop is dead. Then there's the whole issue of security, privacy, and data ownership. Cloud demands a lot of trust in the provider, and mobile treats user data with something near contempt (apps "own" their files, etc.). There is absolutely no way I am writing a novel or a Ph.D thesis in the cloud or on a mobile device. I'm doing it on a machine I control with a backup system I control where an app being pulled from an app store or a cloud provider experiencing a hack/failure won't obliterate my two years of work.
Granted that such things can be written now in languages other than C++, and sometimes can even be shipped in those languages without torturing the user with secondary runtime installs and other insults. But C++ still really rules here. You write it, you build it, and you ship it. Bloat is fairly minimal. Even if you use Qt the bloat is still a lot less than Jabba.
Good examples though. If you were building them from scratch, I would still question the choice of C++ for these as opposed to C#, Objective-C native UI layers combined with a C core.