I'm actually on the same train right now, are there any good learning resources to get into modern C++(CPP17/20)?
Ask HN: Should I learn C++ in 2021?
21–30 of 44 posts
Re: Ask HN: Should I learn C++ in 2021?
#22What changed? There is code I need to do maintain in c++. If I don't do it, it might not happen.
Sounds like you are in a similar situation.
It feels weird learning a language competing with a HN darling (Rust), but I have the need.
Re: Ask HN: Should I learn C++ in 2021?
#23Learning C++ makes learning other languages easier. It's C++ that made me grok the difference between stack and heap allocations; it taught me about moving semantics, dynamic arrays, reference counting garbage collection, data structure alignments, dynamic/static linking, segmentation faults and many more things.
The above things made me understand better how other programming languages work under the hood.
At times I find C++ code that is of intrinsic interest to me. Bitcoin, for example, was authored in C++. However I dread writing C++ because I find it very complex and it has outdated coding environments. Thus I am very happy I don't have to write it.
Re: Ask HN: Should I learn C++ in 2021?
#24Re: Ask HN: Should I learn C++ in 2021?
#25To be honest if you know C#, Java or ObjectiveC you already know the core 90% of C++. The main thing left is understanding pointers vs references vs stack vs heap allocation (egthe instance.x vs instance->x difference) because C++ has those explicitly different pointer vs non-pointer intances of "instance", while C# or Java hide that difference (so if you know C# you can slightly think of it as struct vs class in C#…
If we change 90% to about 20% then this becomes a true statement. Yes, you can get toy code to compile and apparently work by pretending C++ is Java with some low level stuff that can be ignored, but that's nowhere near proficiency. The language is full of seemingly obvious concepts like static initializers that function unlike what you'd expect from working with C#, Java, or even C.
> IMO C++ got some very bad rep for no reason at all: it got mythologized into a "very difficult arcane language that people makes meme about".
It got that reputation on account of having an 1853 page standard that even members of the committee admit no one of them fully understands.
> C++ just makes this even more explicity(sic) since YOU can decide if a class is a copy-by-value or a reference on the fly
And this is why it's such a kitchen sink standard. The C++ community is so large and has so many stake-holders relying on diverse problem domains and programming paradigms that the standard has to permit the developer much greater control than higher level languages like Java.
In closing, to speak to the original poster's question, becoming proficient in C++ is in no way a career limiting move, and will definitely open up some opportunities. However, becoming an expert is a very deep rabbit hole to go down. Even a level of proficiency that will allow you to work on a large project will take some serious intellectual commitment. One way this is apparent is how the C++ community has its own large and distinct conceptual lexicon that for the most part has not worked its way into the general programming community. I personally found working on large C++ projects intellectually gratifying, so I would recommend helping out on the project for a year or so to start. That's enough time to get a very basic understanding of the language and see if it's something you really want to become an expert at. And even if you don't, you'll learn a lot.
Re: Ask HN: Should I learn C++ in 2021?
#26There is a LOT of code in C++ out there. I write in it every day. There are a lot of open source project written in C++.
C++ isn't even that hard to learn, at least to a basic level of fluency, but there is a lot to know to be good at it.
Re: Ask HN: Should I learn C++ in 2021?
#27C++ is vast and diverse, but if you have interest in functional programming you may actually end up enjoying C++, since thanks to it's value types and it's imperfect albeit powerful type system (it's a bit like a compile-time dynamic typing, allowing interesting translation of Lispy patterns). I'm actually on a mission to build a solid ecosystem of functional and value-oriented tools for C++ and interactive software,…
What's funny is the move toward value types as trendy right now, meanwhile 10 years ago I was writing copy constructors in C++ to control the value semantics of values.
Re: Ask HN: Should I learn C++ in 2021?
#28Re: Ask HN: Should I learn C++ in 2021?
#29>- I’m hesitant towards C++ as it seems an ancient programming language and I don’t know for how long it will be around. Twenty years ago, I learned Delphi rather than C++, because I thought C++ is an ancient language, and Delphi was modern. Now Delphi is basically dead, and C++ is still around.
C++ has new versions every three years, and Delphi is still widely used, just not well-known in the English-speaking dev work.
Re: Ask HN: Should I learn C++ in 2021?
#30Just a few things you should consider: - C++ is highly complex. The poster lower down claiming you already know 90% if you know C#/ObjC is simply wrong. The learning curve is steep. - Your stated experience sounds a bit like "App developer" and while that gives you plenty of experience, the projects tend to be a bit smallish. C++ projects on the other hand can be huge and extremely complex. Think 4 hrs for a clean bu…
I'm not sure what this has to do with the language itself or why you think other languages don't also have large projects written in them.