I find that when someone's made up their mind about me based on little to no data, there's not much point trying to prove them wrong.
> C++ is one of the most widely used languages for application development
What kind of applications?
It's a little like saying what are some good modern uses for Java? Then you remember that millions of people use Android every day.
I work in computer vision and deal with hardware a lot, both embedded (micros) and 'higher level' (cameras, random optomechanics). You get drivers in C/C++, often dot net, and occasionally other languages. Sometimes you get lucky and someone's written a Python wrapper already, but most of the time it's faster just to use the C++ (otherwise now you have another library to maintain and keep up to date with the vendor - someone else can do that!).
If you work in web development, it's easy to forget that you can't just write a backend in Python and then make it look snazzy with CSS and Javascript. It's one of the few areas where C++ doesn't have much penetration. That said, browsers are written in C++ (Firefox and Chrome, for example) and of course the web servers themselves (plus some C).
The combination of C++ and Python is very powerful. Modern C++ is very easy to read and if you use the STL, you can write surprisingly compact code. I'm also a big fan of Qt for GUI development (plus the other bits you get with it).
This is not entirely true anymore for Firefox: it's partially Rust.
Of relevance here, millions (or whatever) of developers need Java every day to build Android applications and all kinds of line-of-business applications all over the world
You can't say the same thing about C++, even if developers build ontop of C++ tools. That is the very point I'm driving towards : not that Cpp isn't an important language or ubiquitous, but that 99% of developers don't have a realistic need for it in 2017.
Yes, it's an important language - but only like 0.1% of developers actually have a good reason to use it.
> If you work in web development
Or mobile development, or game development, or desktop application development - i.e. the vast majority of apps that consumers actually interact with don't require much if any C++ development even if they rely on tools written with C++.
I think most of what you write is based on your imagination about C++ instead of facts and the facts are different. There are millions of C++ developers on our planet.
Read this:
https://blogs.msdn.microsoft.com/zxue/2016/10/24/how-many-de...
And those are only one IDE (Visual Studio) stats.
"sounds like" is very much the opposite of that.
> What kind of applications?
All of them, except web pages.
This is just factually untrue. Mobile, desktop, data analysis, machine learning and even games : neither are primarily developed with C++ these days.
I imagine you're going to respond with snark about how game engines are written with Cpp, or mention some edge case where a CLR / JVM language needs to call out to native libraries - but there's no escaping the fact it's a niche skill set and one of rapidly diminishing importance to the overwhelming majority of developers.
Unreal Engine uses C++, Unity's core is C++. DirectX is a C++ API.
Install any game on Steam and you'll see the Visual C++ runtime being installed most of the time.
> Unreal Engine uses C++, Unity's core is C++. DirectX is a C++ API.
I honestly think I addressed this. Most developers aren't trying to extend Unreal or Unity - they're building games with the aforementioned tools.
But you're right that C++ is getting used less and less in games, but I would still say that it's the most used language, especially in AAA games.
Android NDK, Objective-C++, ...
> desktop applications
There are plenty of applications written in C++, from legacy code bases like MS Office to almost all content-creation tools ever, most applications whose abbreviations contain "computer aided", many libraries, and boatloads of applications. Like I said, C++ is used practically everywhere.
Most applications developed on Qt are C++ (some Python). Qt itself has already a large user base.
> data analysis
From matlab to gnuplot, oscilloscope and spectrum analyser software, data analysis applications are frequently developed using C++.
> machine learning
On many repositories I can rather clearly see a broad pink bar, e.g. https://github.com/search?utf8=%E2%9C%93&q=topic%3Amachine-l... https://github.com/tensorflow/tensorflow
-
If some proprietary application is not obviously written in .NET or Java, C++ is a safe bet.
Those toolkits are only useful for edge cases. SDK performance is adequate for 95% of real world applications.
> From matlab to gnuplot, oscilloscope and spectrum analyser software, data analysis applications are frequently developed using C++.
I.e tools that don't need to be re-implemented, some of which had they been built today could easily have been written with a bytecode / JVM / CLR language.
> On many repositories I can rather clearly see a broad pink bar, e.g. https://github.com/search?utf8=%E2%9C%93&q=topic%3Amachine-l
In your own link C++ ends up in a distant 6th place. What is that supposed to prove? That it's more popular than JavaScript in ML development?
> https://github.com/tensorflow/tensorflow
Another tool I'm not re-implementing. You conveniently left out that all of their models are developed with Python - which is what 99.99% of developers interested in ML are trying to do.
From the discussion I've read in this thread so far, it seems like you're claiming "what's the point of the entire field of mechanical engineering" when you, personally, just want to drive a car (not build one), fly on a plane (not build one) and so on.
Scala, Java, C#, Obj-C / Swift, Python, JS.
> what kind of programs do you write?
At work : line of business, database / search / indexing systems, mobile apps, web apps
At home : mobile apps, indie games
> it seems like you're claiming "what's the point of the entire field of mechanical engineering" when you, personally, just want to drive a car (not build one), fly on a plane (not build one) and so on.
You've misunderstood. What I'm claiming is that there are very few tasks at hobby-project scale that C++ is ideally suited for. C++ is a language that's used at team-scale, and is no longer an approachable language for the individual.
In other words, with Java you can build Android apps, with C# you can build Unity games, with Python / JavaScript / Whatever you can build web apps.
What can the individual do with C++ they couldn't do easier faster or better with some other language? Maybe embedded systems - but C seems just as effective for that domain. Likewise for kernel development for obvious reasons.
I actually want a reason to use C++, but "well you can work on Photoshop or high performance computing or HFT plumbing software" is not a helpful answer - both for me and anyone else hoping to pick up Cpp in their spare time.
I started the project in Python but switched because it wasn't particularly good at anything vs. the combination of Mathematica and C++. Actually I prototyped it in C++ too before doing some extra analysis in Mathematica only because it had some algorithms that OpenCV didn't.
Remove C++ from software development and check what is still working...
Remove opcodes & assembler from software development and check what is still working...
See how completely absurd that sounds?
Are you asking about the ROI in terms of learning and personal growth? Then it's tremendous. The language that you probably are using (Java or C#) was written because most average programmers couldn't handle the power and flexibility of C++, so industry developed those languages as lookalikes with training wheels. If you've ridden a bike with training wheels your whole life, then aren't you at least curious at some point to see what it's like with them taken off?
If nothing else, then you'll learn why decisions were made the way they were in derivative languages, and become a better programmer overall. It gives you certain amount of confidence to have experience in a language that most people are afraid of.
If you're asking me to be specific, then I'd like to compare the ROI of developing greater C++ intuition vs. developing better machine learning intuition.
> If you've ridden a bike with training wheels your whole life, then aren't you at least curious at some point to see what it's like with them taken off?
Like just about everyone here, I've spent years of my life writing C in systems and OS classes. Are the OO abstractions that Cpp layers on top of C really that important for my personal growth? I don't see it unless I have something practical I can use it for.
> If nothing else, then you'll learn why decisions were made the way they were in derivative languages, and become a better programmer overall. It gives you certain amount of confidence to have experience in a language that most people are afraid of.
This is the definition of hand-wavy, and sounds a lot like the reasons the people on HN give for learning functional languages like Lisp and Haskell that you deride so much.
I'm a seasoned C++ developer; I can confidently apply for any job that requires years of C++ experience.
I don't find much intellectual satisfaction in that work.
If you're able to self-actualize with C++, good for you; it doesn't work for everyone.
Universities are a much longer and unfortunately financially inaccessible route for me. Going to try the "build-a-portfolio-and-start-freelancing" approach.
From http://www.ensisoft.com/temp/cplusplus_stack.png (why is this a PNG and not a JPEG?), Modern C++ Design and C++ Template Metaprogramming are likely to be the most challenging. Don't get me wrong, they are fantastic works, but are probably not what you need right now.
C++ Primer, C++ Common Knowledge, and API Design for C++ are books that I think you should consider that are not listed in the post above. If you have never studied computer architecture it is an important subject to understand. There are good books like Computer Systems: A Programmer's Perspective, but others may have different opinions.
Is the JPEG question a test? If so I don't know!
The last ones you mentioned sound good, and I think I'll add those to my list and start with Accelerated C++ and see how that feels.
I appreciate the info!
I understand your reservations but keep in mind that the blog post is intended for an audience that has already bought into C++ programming and therefore, may want to improve their baseline C++ skills.
It's not an an evangelism article to convince those not using C++ right now.
That said, to answer your question directly... I think that programmers who require high-performance code with low-to-zero cost abstractions will self-select into C or C++ ecosystems. In other words, a programmer thinking about writing a web app to track food recipes isn't going to be perplexed about choosing "C++? vs Ruby? vs COBOL?". Like you hinted at, the domain of the app constrains what the programming languages will be realistically chosen.
I get that. Maybe I should have added a disclaimer to that end.
> In other words, a programmer thinking about writing a web app to track food recipes
You're maybe the 5th person who's made thinly veiled barbs about me being one of those despised subhuman web developers, so I'll just answer this once and for all :
Though I have written web apps in the past, I'm not really a web developer. What I am is a developer who builds shit that people use - be it desktop apps, mobile apps, games or web-apps. I don't give two shits if I'm using RubyScript or a goddamn magnetized needle : if I need the tool I'll happily learn it. My only problem here is I can't find a good reason to learn C++. That's all.
Weird considering that was my specific question.
> considering it's like 20% of the US economy
The disproportionate size and role of the parasitic financial sector is a tragedy for the modern US economy.
Moreover I wasn't asking about job opportunities per se - like you so astutely pointed out I can just search for those. I was more interested in what could I personally use C++ for that didn't involve joining a large dev team working on some unspecified codebase.
C++ is special because it combines two big ideas:
- Zero-cost abstractions (you only pay for what you use)
- High-level abstractions (OOP, lambdas, code-generation, etc. )
I would jump straight to C++ 17. It looks completely different to early 2000s C++ and makes functional programming easier (type inference, lambdas, constexpr, etc. ).
If you learn to use C++ well, you will be able to write faster code faster.
I'd love to, but there are simply no (accessible?) resources. I'd love a "how to write C++17 with no baggage" book, but it simply doesn't exist. (please, correct me if I'm wrong?)
I really want to get to know C++, it looks like it's become a fantastic language, but in all seriousness, I could write fast, performant robust Go within a weekend, I'm proficient in half a dozen other languages, and C++ programmers still unironically suggest a stack of books the height of a small table to beginners.
The Book is intended for all C++
developers, regardless of their experience. The
beginner and intermediate developers will benefit
the most from the book in their attempt to become
prolific with C++.
Experienced C++
developers, on the other hand, will find a good
reference for many C++11, C++14, and C++17
language and library features that may come in
handy from time to time.True in theory and essentially because C++ still remains mostly a superset of C, but unfortunately the majority of C++ programmers I've met tend to overabstract and not realise it, making this claim not really true in practice.
High-level abstractions (OOP, lambdas, code-generation, etc. )
On the other hand, this is definitely true in practice.
I think this notion is out-of-date. Have a look at this slide: https://youtu.be/_wzc7a3McOs?t=21m37s It shows how C++ has evolved away from just "C with Classes".
I agree that many C++ programmers over-abstract things.
I meant that C code, with few modifications, will basically work fine when compiled with a C++ compiler.
I wouldn't say that C++ is _uniquely_ good for this (C could be used as well as any compiled language that can expose a compatible C ABI which includes Go, Haskell, etc.), but I do feel like the addition of RAII and exceptions matches the Python paradigm quite well.
I'm currently taking Udacity's Self-Driving Car Engineer Nanodegree. Currently I'm on the 2 week "break" between term 2 and 3, which starts on July 6th.
Anyhow, term 1 used Python (and various libraries of course) exclusively. When I signed up, I knew that at some point they were going to use C++ - so I was concerned if my system would need an upgrade (I use Ubuntu 14.04 LTS); but I was assured it would work ok. I was also concerned because I hadn't touched C++ since VS4 (ie - ages ago!) - and I was thinking "will I be able to do this - rusty isn't the word for my skillset in C++".
Term 2 came around, and that's when reality hit - C++ was to be used almost exclusively thru the entire term. Fortunately, Udacity (as part of one of the lessons) gave us a free "preview" of a course they are developing to teach C++ (not sure if it will be free or paid) - and so I went thru that, and found that it was fairly easy! I suppose that my skills in other languages since I had last played with C++ (ie, PHP, Python, Java, Go, Javascript, etc) all worked to make it seem that C++ was "just another syntax". Granted, there are some things which I only barely grok (templates, for instance - but there are several others), but overall, I got things, and was able to successfully finish my projects and complete the term.
Oh - and I had to upgrade my gcc compiler, and a host of other things - because the version of gcc wasn't C++ 11 - which of course is what they were using mostly. So I got to do some unspeakable things to my workstation (and basically fubar'd it so bad I can't do an upgrade any longer - not without some serious work, but I'll leave that to the end of term 3)...
I guess what I'm saying here is that the experience on the Udacity course led me to the agreement with your premise; C++ isn't really that difficult to pick up the basics of if you already have Python (and maybe some other languages) under your belt.
That said - I am looking forward to seeing what Jai brings, if it is ever released to the public...
I don't think that's true. Go only has a FFI to the platform's C ABI (cgo).
https://blog.filippo.io/building-python-modules-with-go-1-5/
As long as you specify the correct interface, Python will happily load your modules.
I disagree. Most desktop apps are written with some kind of bytecode language (like my code editors and IDEs) with a few being written in C++ for very specific reasons (like my web browsers).
> When you add C
I wasn't asking about C
That's maybe true for your Dev tools but not for general purpose apps. MS Office, Adobe products, video players and other stuff regular people use are written in C++.
C++, along with C, which you should also know if you know C++ is also used in the embedded software industry. Because it C++ is still essentially C, you write code for these tiny, bare metal embedded systems and still take advantage of some advanced features like classes, templates, etc...
Where I live, C++ coders are in high demand in various fields, just to let you know.
What fields, aside from embedded? I'm genuinely curious.
* Graphics
* Infrastructure (web servers and browsers, OS's, drivers, etc)
* Any desktop apps that are CPU/memory intensive. think image processing, video editing, even office applications
* Finance
* Games
* AI. GPUs are becoming more popular for training machine learning models, and C and C++ are pretty much dominating this space with OpenCL, CUDA, etc.
You mentioned in previous comments that browsers and stuff don't really count because you're not going to be implementing a browser that competes with the big four. But people have to work on maintaining those browsers. Same with MS office, Photoshop, etc.
The world pretty much runs on C and C++. From the steering column in your car to the computational fluid dynamics models that predict hurricanes and save lives, to the telephone switches that route your cell phone calls. Until pretty much every important piece of digital technology, small or large, switches over to a new language, there will be a need for C and C++ developers.
People do, but I won't be learning C++ to apply for a job maintaining some gigantic piece of software. I never asked about the job market for C++ developers, because there obviously is one somewhere and I can just search the job boards for them.
Implied in my question, or so I thought, is what kind of project can I use C++ for - not what kind of future employment opportunities could I enjoy if I developed professional-caliber proficiency with C++. I was looking for a reason to use C++ as an individual, not as part of the Chrome or Safari team in 5 years time.
And what is good for the pros is good for you too. There is a small caveat about game dev though. While C++ is probably the best language for writing game engines, if your plan is to write an indie game, this is probably a bad place to start. You should probably pick up an existing engine and build your gameplay on top of it using the associated scripting language instead. Writing your own engine can be both fun and instructive but it is not the easy path towards a complete game.
Yeah, definitely not and it's kind of an insane undertaking IMO given how full featured engines & frameworks like Unity have gotten.
Maybe I need to take another look at Unreal, given that C++ is sort of the first class dev language for the framework - for now at least.
This is something I've sort of been poking at this entire thread : there are fewer opportunities for developers to use lower level languages (aside from at work, if the job calls for it - but numerically speaking most jobs don't call for systems-tier languages anymore). Many of our day jobs involve higher level languages (which in my case means Scala), and for the overwhelming majority of solo projects there are languages that are quicker / easier / more effective to ship with than say C++.
Personally, I mostly work around embedded/industrial systems and everything that goes with it such as test and simulation tools. I know some people who work in scientific computing and C++ is used in this domain too.
Of course not all hobby projects need to be "practical" or directly useful - but time is a valuable resource and I at least would like to have an actual non-toy project goal in mind when choosing to better grok a language. What is C++ uniquely good for in 2017?
edit :
Useful answers to this question -