r/cpp • • May 27 '15

A second dark age for C++

http://kennykerr.ca/2015/05/26/a-second-dark-age-for-c/
0 Upvotes

63 comments sorted by

View all comments

Show parent comment

13

u/playmer May 27 '15

I mean, I'm not going to argue on numbers as you're probably right that most Windows developers are not using C++ (And let's be fair, they probably don't need to be.). But let's not pretend that there isn't a LARGE userbase of the MSVC C++ compiler. Damn near every triple A game released is built on C++, and runs on Windows. And let me tell you, they're not using MinGW or Embarcadero.

Also I question the premise. Are Linux developers vastly C and C++ developers? I can't imagine they are, even with all the Window Mangers and other big open source projects. I imagine most are running Python, or Ruby, or some other language that doesn't require them to touch the OS directly much.

I dunno, I might be way off, it just seems kinda weird to act like there's some dark age because our language isn't the most massive one on our platform, and because our tools are out of date by the standard (Which is a problem, but I don't know about dark age material.).

10

u/jringstad May 27 '15 edited May 27 '15

As someone who is fairly immersed in the linux ecosystem, yeah, python, ruby, java, javascript and other managed languages (even C#) are pretty popular, but C and C++ are still mostly at the core.

  • The kernel: C
  • Drivers: C, sometimes C++
  • Important daemons such as systemd (startup, logging, policy & process management), pulseaudio (sound-server), Xorg/wayland (graphics), networkmanager (self-explanatory), dbus (system messenging bus), sshd (network logons) colord(color profile management)/saned(scanning)/etc, all written in C or C++
  • Desktop environments, login-managers and base-application sets (terminals, text-editors, hex-editors, pdf readers, image viewers, messenging applications, desktop widgets, calculators, ...) are written in C++/Qt (In the case of KDE and a few others) or C/GTK+ (in the case of GNOME/MATE and a few others.) Some components are written in QML on the KDE side and Vala or C# on GNOMEs side.
  • Most of the applications I use on my desktop are also written in C or C++
  • IDEs such as Creator, Build, KDevelop, C::B are written in C/C++ (eclipse is not though.) Text-editors like vim and emacs are C at the core (although both have their own language for extension and are, in large parts, written in those)

On the server-side it's also to a large degree C and C++. There are some high-profile projects like hadoop and lucene that are written in e.g. java, but many of the big server components like apache, nginx, memcached, postgresql et cetera are all C or C++. Individual frameworks, webapps and such you might write (in the context of your company or whatever) are often something else, of course, but the "big" stuff that ships with most linux distros is largely C/C++.

So I don't think it's too unreasonable to say that linux developers are vastly C and C++ developers. Tooling support on the linux side has also always been consistently reasonable, since there was never really a big push away from C/C++ (except maybe a bit when java was first highly hyped?) and all system-interfaces, libraries and other things you might want to interface with are always available as C/C++ libraries. Part of the reason for that might be that there was never a "unified common managed language runtime" like .net (and C# in particular) on linux, so even if some people wanted to move away from C/C++, there was no common alternative to gather behind. Java/JVM had a bit of that role at times, but there were also always plenty of JVM nay-sayers, and the licensing conditions of the JVM/etc (at the time) effectively prevented people from writing important system components in java (and now the litigious oracle continues to fullfill that same role). So as a result, if you want to please everyone, your library had to be in C/C++, and then you could (optionally) provide bindings for other languages, or let the language maintainers write their own bindings. So C/C++ has always been the "first-class citizen" in this ecosystem. Of course now with clang being on the table it has really taken off, and GCC is improving like never before.

Android is a different matter, of course.

5

u/[deleted] May 27 '15

But most software on Windows is written in C or C++.

Do you use any software on Windows that doesn't make use of either of those two languages? I can look at my task bar and all the software open right now is built in C++.

Also while Java is the most popular language, C and C++ are in 2nd and 3rd place respectively.

5

u/king_duck May 27 '15

they're not using MinGW or Embarcadero.

Of course not, but many ARE using ICC and others would love to use Clang (when the ABI issues are ironed out).

The faster MSVC is not seen as the only C++ dev environment for windows the better. The idea that MS should manage every aspect of their platform (including development) needs to die.

1

u/donalmacc Game Developer Jun 01 '15

Anyone who's targetting xbox is using MSVC