views:

763

answers:

14

Possible Duplicate:
Which sector of software industry uses C++?

C++ was for many years the holy grail of mission critical high performance development. However, it seems that for the past 10 years like much of the development world has moved to Java and C#. My quesiton is this, is C++ effectively relegated to embedded systems, OS, Browser and other special purpose development? Should I let this skillset go the way of the VB 6 and other skillsets that are no longer showing the same level of demand and value in the market? I love C++ and would love to update my knowledge in it, but I wouldn't even know where to begin to try to apply it to common business problems today.

Regards.

+8  A: 

"C++ effectively relegated to embedded systems, OS, Browser"

"other special purpose development"

You mean 99% of the code people run on a daily basis?

Chris H
I would guess by the wording in his question that "general-purpose development" means line-of-business applications. But you apparently managed to create a nice rep-farm anyway. Good for you.
Robert Harvey
And only a tiny, tiny fraction of developers develop those browsers/office suites/OSs .
nos
literally every single app I use is C or C++. Look at KDE, GNOME, all C++. I know exactly what languages all my programs are in, because I compile all of them. I use Gentoo. I don't see anything else go through. And I assume those applications come from somehwere, so I'm guessing there are alot of developers using C++. The only place I don't see C or C++ is in schools.
Chris H
+6  A: 

C++ is still heavily used in many mission critical financial applications. For example, most of Bloomberg's platforms are based on C++ with very little front end in other languages. Many investment banks and hedge funds use algorithmic trading systems written completely in C++ (e.g., Tower Research Capital, Knight Capital, etc.).

If you've been out of C++ for a while, you may need to get used to a whole bunch of now-standard libraries. When I was doing most of my C++, STL was fairly new and you either adopted the Microsoft libs or did not. If I went back to C++ now, I'll have to learn all the new libraries to be effective.

I think most of the movement to other languages is related to web development and web-centric development. The main exception to that would be Google, which still primarily use C++ and Python.

Uri
Yes. C++ is the choice for high-performance applications, especially server-side, networked and multithreaded. I do see a shift towards C#/.NET for GUI apps, but servers and algorithms where I work (also finance) are all C++/linux.To your point about getting used to a whole bunch of now-standard libraries -- add boost to that list. It's almost essential when programming C++ now.
xzqx
Even for financial applications some investment funds are moving towards C# with fair success.
David Rodríguez - dribeas
For scientific applications, especially big clusters, its still mostly C++ or Fortran.
KeithB
@David: Some funds indeed use Java/C#. My own company uses Java for a great trading platform, and I know of other companies (like IB) that use the same. But still, C++ is quite prevalent.
Uri
@xzqz: Boost is the one I was meaning to refer to, but the name escaped me. I wish I had that back in my C++ days.
Uri
A: 

C++ is still very popular. For instance, combined with Qt it is often used.

Thirler
+2  A: 

It hasn't gone away if you need to do something really, really fast. If "fast enough" is OK, then C# and Java are fine, but if you have a calculation that takes hours or days, or you need something to happen on the microsecond timescale (i.e. high frequency trading) C++ is still the language to use.

Steve
"but if you have a calculation that takes hours or days". If written correctly, a Java application will run in comparable time to the C++ solution, because of JIT compilation.
Chinmay Kanchi
I will have to respectfully disagree. The optimizations that can be done on C++ code (see the Intel compiler's vectorization), in a addition to its very low level memory management will wipe the floor with Java/C#. I've done the comparison on floating point math in tight loops with C# vs. C++, and its no contest, c++ is an order of magnitude faster for my applications. That's not to speak badly of managed languages, I greatly prefer writing in them, its just important to know what tool to use in what case.
Steve
Java can be just as fast as C++ if written correctly. Corollary: Nobody ever writes Java correctly.
zaratustra
C++ is still the king in constrained environments, where resources (time, memory, etc) must be carefully managed. For example, the java JIT compiler/VM.
tfinniga
+5  A: 

C++ is still valuable for many high performance apps. There are other technologies, and depends on the situation different languages are better suited for your needs. But if you want strong performance, good control of what your code is doing, and flexible networking and programming stack, C++ is still a good choice.

A better suggestion is: let the problems come to you and find the language that best suites the situation, rather than take a language and go look for problems.

Still: if you know C++ well, you can learn/program in anything.

OverClocked
+1 for the last point. if you want to know programming mechanics(pointers, references, virtual functions, inheritance, etc., etc.), C++ is the way to go.
chester89
A: 

C++ is usually used for systems work, generally defined as software where the UI is not central, not application work -- where the UI is central. So, for general business use it's probably not very interesting and those problems are better solved with a higher level language. However, there will always be low level systems work to be done, and C or C++ is the practical answer for those problems right now.

Joel
C++ is still *very* heavily used in commercial desktop applications development. Maybe not web applications or in-house tools, but for product development absolutely.
280Z28
+3  A: 

To this day, C++ is the only language which is both object oriented and compiled (or at least, which has a mature ecosystem of optimizing compilers). Which leaves it as the sole choice for most large scale, compute-intense projects.

To me the prominent example is games and game engines - these are huuuuuge projects that squeeze machines for milisecond-fractions. MS is trying to get some traction for XNA (a managed game-dev framework - basically a DirectX wrapper ), but most probably would never get any for AAA game productions.

Ofek Shilon
+6  A: 

First of all, I doubt anybody can give a definitive answer -- there's just no way to tell exactly how much any particular language is really used. Nearly anything you can measure is a secondary measurement, such as how many people are advertising jobs using that language. The problem is that this tends to show relatively new languages as dominating to a much greater degree than is real.

That said, my belief is as follows. At one time, C++ was the hot new language on the block, and there was a bubble when it dominated the market. That bubble deflated quite a while ago. Since then, use of C++ has been growing on an absolute basis, but the market has been growing (quite a bit) faster so its shrinking on a relative basis.

There are a couple of reasons this doesn't show up in most secondary measures such as job advertisements though. A couple of the obvious ones include:

  1. Many teams producing C++ have now had years to "settle in", so the turnover rate is relatively low.
  2. It's now well established where it's used, so positions tend to be filled by internal promotions.

There's another effect I almost hesitate to mention, but it's true no matter how little a lot of people like it: there are both programmers and managers who are more excited about "new" than effective. This leads to a large group of wannabes who are constantly on the move to the latest and greatest "technology" (whether that happens to be a language, framework, platform, or whatever). They get a job, loaf (or worse, actually write some code), then move on to their next victim...er...employer. They cause a lot of "churn", and inflate the number of job advertisements, but produce little or nothing of any real value. That group moved from C++ to Java a long time ago, and have long since moved from Java to C# to Ruby on Rails to Hadoop to whatever the managers are excited about this week.

Lest I sound excessively negative, I should add that along the way, a few of them really find something they're good at, and (mostly) tend to stay with that. Unfortunately, for every one who does, there are at least five more new graduates to join the throng...

Jerry Coffin
Very insightful answer that takes a clear perspective on the issue. I'm going to let the C++ experience I have fall to the side and focus more on C# and F#.
Nissan Fan
A: 

As a general development language? Well, it depends on your industry, but I've worked in two different industries and there is always plenty of C++ work:

  1. Telecoms
    • Embedded devices often use C and C++ for core services
    • Network equipment, often very complex, heavily utilize C++
    • Software apps that work with hardware will often be written in C++
  2. Financial Services
    • Trade Execution systems are often in C++. You cannot have your garbage collection kick in when you're executing an order for a customer.
    • Algorithmic and high-frequency trading systems are usually in C++
    • General trading systems that do not have strict speed requirements seem to be in C++ and Java, with C# starting to show up as well.
    • Administrative applications tends to be written in Java, VB, or C# these days
    • Recently there is a trend towards functional languages for quantitative analysis, so F# and Haskell are starting to appear, and SAS and Matlab are always common too

I read somewhere that Nyse/Euronext uses Java, but that they disable the garbage collector and run on servers with insane amounts of memory.

Dr. Watson
+1  A: 

Different languages are prevalent in different domains. It is interesting that you think it might be rendered unimportant by being relegated to embedded systems when in fact that is where most software development occurs; at least in terms of number of projects/products.

There are many ways of measuring, and a number of them are presented here: http://langpop.com/. The evidence suggests that C++ remains important.

Clifford
+1  A: 

More often than not, we get lost in the hype cycle. First there was Java, then came PHP, and currently is Python. But the fact of the matter is development of general purpose desktop application still requires use of libraries like Carbon/Cocoa for mac, GTK/QT for Linux, MFC for Windows. All of which are C/C++ based. So are most applications written for these platforms. So calling C++ as being relegated to embedded is not right, although yeah its being extensively used now, unlike earlier when it was just assembly or C at the max. In my opinion, if you want a high performance application with great looking GUI, it still has to be done in C/C++.

the100rabh
+1  A: 

I'm not sure whether the gaming industry falls under "general purpose development", but if you want to develop anything that you intend to get working on more than a single console, C++ is what's for lunch. While many gaming and 3D libraries have extensions for other languages, they -all- have extensions for C/C++.

zaratustra
A: 

C++ is still used everywhere you want the best performance. Its major advantage is that you can use literally for everything. In addition to what other people have said you can also use it to power websites, for instance OkCupid uses it almost exclusively.

As the recent Hip Hop of Facebook shows, in the end, if you can afford it (ie. you have a large and competent team) you can always gains something using it. Then it also a matter of scale, other than industry.

gabriele
+2  A: 

If I take a look at the applications I have installed on the laptop I am writing this message on, I see a lot of C/C++ and few (if any) managed apps. Examples? Google Chrome, Firefox, iTunes, uTorrent, Spotify, Picasa, Google Earth, OpenOffice, Notepad++, IrfanView... this list goes on and on. I write desktop applications for a living, which are installed on thousands of PCs worldwide, and C++ is still my language of choice. The lack of dependencies (WTL is your friend) is a massive plus IMHO (and that of my customers I should add!.) YMMV though - as a seasoned developer I think I am productive enough in C++, but I can't speak for everybody.

Rob