News for hackers. Stuff that matters.
Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @06:52AM (#14618226)
This sounds like a lot of fun, but I'm concerned about the limited ROI. How many practical, modern use cases does Cpp have at this point for those of us who don't work in a few very specific verticals like finance or game dev? Even in those aforementioned industries, C++ is reserved for niche roles / use cases.

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 -

    * extending libraries for higher level languages
    * embedded dev
Re:Ways to Get Better at C++ by dom0 on Friday June 23, 2017 @07:08AM (#14618288)
TBH it sounds like you immersed yourself in the "everything is node or go or rust" HN bubble. C++ is one of the most widely used languages for application development.
Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @07:12AM (#14618312)
> TBH it sounds like you immersed yourself in the "everything is node or go or rust" HN bubble

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?

Re:Ways to Get Better at C++ by joshvm on Friday June 23, 2017 @07:32AM (#14618393)
In terms of application development, cross-platform GUIs are a pain in virtually any other language, ignoring platform specifics like Objective-C or dot net. Ever tried to ship a frozen Python binary? Never again.

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).

Re:Ways to Get Better at C++ by pcwalton on Friday June 23, 2017 @11:19AM (#14619766)
> That said, browsers are written in C++ (Firefox and Chrome, for example)

This is not entirely true anymore for Firefox: it's partially Rust.

Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @09:19AM (#14618924)
> 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.

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++.

Re:Ways to Get Better at C++ by lossolo on Friday June 23, 2017 @11:10AM (#14619710)
> You can't say the same thing about 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.

Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @01:31PM (#14620983)
Yeah that's fair. I've also underestimated the number of Cobol developers out there; C++ devs only slightly outnumber them.
Re:Ways to Get Better at C++ by snovv_crash on Friday June 23, 2017 @08:10PM (#14623686)
You can't reuse your Java code on iOS. C++ can be reused on virtually any platform. The only other language you can do that with is C and interpreted languages with the interpreter written in C/C++ (which is slow if it is cross platform).
Re:Ways to Get Better at C++ by BatFastard on Friday June 23, 2017 @12:56PM (#14620672)
Every time I have to deal with Qt I just want to stab myself in the eye. It is the least intuitive and most difficult environment I personally have ever had to deal with.
Re:Ways to Get Better at C++ by sqeaky on Friday June 23, 2017 @02:30PM (#14621495)
I completely agree with you and its still the best cross platform general purpose GUI library.
Re:Ways to Get Better at C++ by dom0 on Friday June 23, 2017 @07:25AM (#14618365)
> made up their mind

"sounds like" is very much the opposite of that.

> What kind of applications?

All of them, except web pages.

Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @08:27AM (#14618633)
> 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.

Re:Ways to Get Better at C++ by jhasse on Friday June 23, 2017 @09:08AM (#14618863)
> and even games : neither are primarily developed with C++ these days.

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.

Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @09:15AM (#14618909)
> I imagine you're going to respond with snark about how game engines are written with Cpp

> 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.

Re:Ways to Get Better at C++ by jhasse on Friday June 23, 2017 @09:22AM (#14618943)
At least in Unreal you can build your game in C++.

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.

Re:Ways to Get Better at C++ by dom0 on Friday June 23, 2017 @08:38AM (#14618693)
> Mobile development

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.

Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @09:14AM (#14618900)
> Android NDK, Objective-C++

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.

Re:Ways to Get Better at C++ by psyc on Friday June 23, 2017 @11:03AM (#14619669)
My problem with your line of argument in this whole subthread is that no matter how many examples people give you of important categories where C++ predominates, you've already decided that the sum total of all that is "niche".
[dead]
Re:Ways to Get Better at C++ by pvaibhav2 on Saturday June 24, 2017 @08:30AM (#14625362)
I'm interesting in your background: which languages do you use, and what kind of programs do you write? Perhaps it'll become clearer whether C++ is any use to you or not.

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.

Re:Ways to Get Better at C++ by doktrin on Saturday June 24, 2017 @09:34AM (#14625517)
> I'm interesting in your background: which languages do you use

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.

Re:Ways to Get Better at C++ by pvaibhav2 on Sunday June 25, 2017 @12:23PM (#14630757)
Well if you're looking for anecdotal evidence: my last hobby project (OCR for a specific book+script), I used Mathematica to prototype (fast iteration) and C++ with OpenCV to implement it (way faster execution).

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.

Re:Ways to Get Better at C++ by mhtxhn on Friday June 23, 2017 @08:38AM (#14618692)
Chrome, Firefox, Adobe CC, etc. Node requires V8, which is written mostly in C++.

Remove C++ from software development and check what is still working...

Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @09:23AM (#14618953)
> 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?

Re:Ways to Get Better at C++ by ajdlinux on Friday June 23, 2017 @07:13AM (#14618322)
Anywhere that deals in embedded development, you're going to have to touch C++ at some point.
Re:Ways to Get Better at C++ by kronos29296 on Friday June 23, 2017 @08:04AM (#14618528)
Most competitive programming is done in C++. It probably will be in near forseeable future. This is because of speed and STL.
Re:Ways to Get Better at C++ by StevePerkins on Friday June 23, 2017 @07:50AM (#14618471)
Are you asking about the ROI in terms of professional career opportunities? Probably three orders of magnitude greater than it is for Rust, D, Haskell, Lisp... or any of the other flavor-of-the-month darlings that HN uses in their hobby projects, but for which few jobs exist in the real world.

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.

Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @08:45AM (#14618720)
> Are you asking about the ROI in terms of professional career opportunities? Probably three orders of magnitude greater than it is for Rust, D, Haskell, Lisp

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.

Re:Ways to Get Better at C++ by kazinator on Friday June 23, 2017 @03:16PM (#14621950)
> Are you asking about the ROI in terms of learning and personal growth? Then it's tremendous.

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.

Re:Ways to Get Better at C++ by LMYahooTFY on Friday June 23, 2017 @08:31AM (#14618655)
Do you think the suggested books in OPs link are accessible to me if I've only a couple of intro to C++ and Java under my belt?

Universities are a much longer and unfortunately financially inaccessible route for me. Going to try the "build-a-portfolio-and-start-freelancing" approach.

Re:Ways to Get Better at C++ by zerkten on Friday June 23, 2017 @10:27AM (#14619358)
It's hard to know without knowing what your intro to C++ looked like, and what your background is. If you can get through Accelerated C++, then some of those books may be useful once you've gotten some practice.

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.

Re:Ways to Get Better at C++ by LMYahooTFY on Saturday June 24, 2017 @02:40PM (#14626838)
Well I think my intro was pretty rudimentary. My knowledge of computer architecture is as well, I can tell you what pieces do what, and what a buffer is, but I couldn't really tell you how memory addressing, logic gates, instruction sets work.

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!

Re:Ways to Get Better at C++ by jasode on Friday June 23, 2017 @07:35AM (#14618408)
>How many practical, modern use cases does Cpp have at this point for those of us who don't work in a few very specific verticals like finance or game dev?

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.

Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @09:44AM (#14619074)
> It's not an an evangelism article to convince those not using C++ right now.

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.

Re:Ways to Get Better at C++ by quantdev on Friday June 23, 2017 @12:37PM (#14620467)
No one is trying to convince you to use C++. Obviously the data show there are tons of C++ jobs and this is something you can google yourself. And finance is not a "niche", considering it's like 20% of the US economy. I'm in finance and I write high-performance simulations and pricers. These things need to be predictable, fast, and the code needs to be maintainable. And yes, despite what the prevailing Go or Rust bros say, modern C++ is maintainable.
Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @12:43PM (#14620533)
> No one is trying to convince you to use C++

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.

Re:Ways to Get Better at C++ by quantdev on Friday June 23, 2017 @12:50PM (#14620597)
You've clearly made up your mind, considering you are just arguing random points -- your opinion on finance is not relevant to the point that there are lots of C++ jobs in finance. And it's not just for some legacy reason: even much of Blockchain infrastructure is build with C++ and many crypto jobs that are open today are for C++.
Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @12:59PM (#14620693)
So, I specifically cited finance in my original comment, and yet you come with "yeah but finance..." as if that's somehow revelatory.

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.

Re:Ways to Get Better at C++ by adgasf on Friday June 23, 2017 @07:13AM (#14618321)
> What is C++ uniquely good for in 2017?

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.

Re:Ways to Get Better at C++ by codebeaker on Friday June 23, 2017 @08:42AM (#14618711)
> I would jump straight to C++ 17.

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.

Re:Ways to Get Better at C++ by DerDangDerDang on Friday June 23, 2017 @09:17AM (#14618917)
I don't own it, but this book sounds like it may be what you're after: http://www.bfilipek.com/2017/06/modern-c-programming-cookboo...
Re:Ways to Get Better at C++ by codebeaker on Friday June 23, 2017 @03:14PM (#14621938)
Thanks for the link it looks promising:

    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.
Re:Ways to Get Better at C++ by userbinator on Friday June 23, 2017 @07:44AM (#14618452)
Zero-cost abstractions (you only pay for what you use)

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.

Re:Ways to Get Better at C++ by slededit on Friday June 23, 2017 @02:24PM (#14621429)
The way it works out in practice is people can develop at a high level, and then when its needed you can go back and refactor where necessary for perf. The average performance does become slower though.
Re:Ways to Get Better at C++ by adgasf on Friday June 23, 2017 @07:58AM (#14618504)
> "C++ still remains mostly a superset of C"

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.

Re:Ways to Get Better at C++ by userbinator on Friday June 23, 2017 @08:09AM (#14618547)
It shows how C++ has evolved away from just "C with Classes".

I meant that C code, with few modifications, will basically work fine when compiled with a C++ compiler.

Re:Ways to Get Better at C++ by CogitoCogito on Friday June 23, 2017 @07:10AM (#14618302)
I feel like C++ interacts with Python very nicely and so if you're a Python programmer, learning C++ can be very useful. I use Python and common libraries (e.g. numpy) for most things and then write extensions in C++ if that portion of the code becomes a bottleneck. You can use pybind11 or boost::python to do this pretty easily (though I personally tend to use the cpython C api directly myself). I think this provides a very nice balance between programmer efficiency and machine efficiency.

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.

Re:Ways to Get Better at C++ by cr0sh on Friday June 23, 2017 @12:59PM (#14620696)
> I feel like C++ interacts with Python very nicely and so if you're a Python programmer, learning C++ can be very useful.

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...

Re:Ways to Get Better at C++ by dom0 on Friday June 23, 2017 @07:10AM (#14618307)
> as well as any compiled language that can expose a compatible C ABI which includes Go

I don't think that's true. Go only has a FFI to the platform's C ABI (cgo).

Re:Ways to Get Better at C++ by CogitoCogito on Friday June 23, 2017 @07:16AM (#14618333)
I'm not sure what you mean by this. Haven't you had the ability to specify as C ABI with the standard golang compiler since 1.5? I don't believe you need cgo. Maybe I misunderstood your comment?

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.

Re:Ways to Get Better at C++ by dom0 on Friday June 23, 2017 @07:23AM (#14618356)
Didn't know that. Thanks!
Re:Ways to Get Better at C++ by zelos on Friday June 23, 2017 @07:04AM (#14618270)
A lot of embedded work uses C++ IME. There seems to be a reasonable demand for it from the job adverts I see.
Re:Ways to Get Better at C++ by smelterdemon on Friday June 23, 2017 @11:34AM (#14619897)
Whether or not you find C++ uniquely useful for more general (e.g. desktop application) programming, it's still one of the most popular languages. There are lots and lots of legacy C++ codebases that are being actively maintained and updated. OTOH the places where C++ is especially well suited may be niche but they also tend to be crucial.
Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @12:53PM (#14620637)
Yeah I agree with this. It got lost somewhere in this shitshow, but I really was just looking for something to use C++ for : obviously I won't be contributing to a legacy codebase or applying for a job maintaining [insert critical software] built in C++ people have cited.
Re:Ways to Get Better at C++ by maxxxxx on Friday June 23, 2017 @10:19AM (#14619306)
C++ may not be uniquely good for this but most desktop apps you are using are written in C++. When you add C all your operating systems are written in C/C+, most web servers and databases are.
Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @10:32AM (#14619390)
> C++ may not be uniquely good for this but most desktop apps you are using are written in C++

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

Re:Ways to Get Better at C++ by maxxxxx on Friday June 23, 2017 @10:42AM (#14619492)
"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)."

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++.

Re:Ways to Get Better at C++ by GuB-42 on Friday June 23, 2017 @08:34AM (#14618670)
C++ still tops performance charts, beaten only by C, while still offering high level abstractions.

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.

Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @08:39AM (#14618698)
> C++ coders are in high demand in various fields, just to let you know.

What fields, aside from embedded? I'm genuinely curious.

Re:Ways to Get Better at C++ by bstamour on Friday June 23, 2017 @10:33AM (#14619401)
* High performance/scientific computing

* 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.

Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @12:27PM (#14620370)
> people have to work on maintaining those browsers. Same with MS office, Photoshop, etc.

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.

Re:Ways to Get Better at C++ by GuB-42 on Friday June 23, 2017 @02:13PM (#14621356)
What you can do? The same things pros do ;) You won't be maintaining Photoshop but you may be dealing with large opensource software written in C++.

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.

Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @02:45PM (#14621648)
> 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++.

Re:Ways to Get Better at C++ by GuB-42 on Friday June 23, 2017 @08:55AM (#14618784)
Just an example of a job I did 2 years ago. It was for a company that did stuff related to digital signatures on official documents. The part that deals with smartcards is written in C++. They are mostly a Java shop, not C++, and that's why the called me. This is an example of "off topic" missions you can find.

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.

Re:Ways to Get Better at C++ by dopple on Friday June 23, 2017 @10:04AM (#14619207)
High performance computing / supercomputing is dominated almost exclusively by C, C++ and Fortran.
Re:Ways to Get Better at C++ by zerkten on Friday June 23, 2017 @10:34AM (#14619407)
Pharma use it a fair bit, especially for Cheminformatics.
Re:Ways to Get Better at C++ by davrosthedalek on Friday June 23, 2017 @09:13AM (#14618895)
I think the performance crown still belongs to Fortran. The compilers have it much easier to squeeze out all the performance. Then comes C, and C++ (if used sensibly).
Re:Ways to Get Better at C++ by arethuza on Friday June 23, 2017 @07:18AM (#14618336)
I suspect that it is likely that the browser you used to post that comment was written in C++.
Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @09:25AM (#14618967)
That's correct, and if I wanted to write a new web browser designed to be performance competitive against the big 3/4 I wouldn't have asked this question to begin with.
Re:Ways to Get Better at C++ by lin_lin on Friday June 23, 2017 @08:02AM (#14618516)
Let me guess, you're a web dev?
Re:Ways to Get Better at C++ by doktrin on Friday June 23, 2017 @08:59AM (#14618810)
You guessed wrong.