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?
11–20 of 44 posts
Re: Ask HN: Should I learn C++ in 2021?
#12To 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#…
One thing: I use Objective-C and I really like it. I don’t feel the same way about C++. If you feel the same way, honor the feeling. Still, I think you can learn C++ and have it be useful for you.
My best wishes!
Re: Ask HN: Should I learn C++ in 2021?
#13Twenty 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.
Re: Ask HN: Should I learn C++ in 2021?
#14Re: Ask HN: Should I learn C++ in 2021?
#15>- 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.
> The Lindy effect is a theorized phenomenon by which the future life expectancy of some non-perishable things like a technology or an idea is proportional to their current age, so that every additional period of survival implies a longer remaining life expectancy
Example:
> If a book has been in print for forty years, I can expect it to be in print for another forty years. But, and that is the main difference, if it survives another decade, then it will be expected to be in print another fifty years. This, simply, as a rule, tells you why things that have been around for a long time are not "aging" like persons, but "aging" in reverse. Every year that passes without extinction doubles the additional life expectancy. This is an indicator of some robustness. The robustness of an item is proportional to its life!
Re: Ask HN: Should I learn C++ in 2021?
#16C++ 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,…
Re: Ask HN: Should I learn C++ in 2021?
#17Re: Ask HN: Should I learn C++ in 2021?
#18C++ and similar unsafe languages have lost majority of the markets they once had. When I started my career in 2000, it was used for pretty much everything, people wrote C or C++ for desktop, web, mobile (PalmOS, later Windows CE), embedded (was mostly bare metal back then).
Over these 2 decades, it’s mostly gone from desktop (initially replaced by Java and C#, and now being replaced by JavaScript and TypeScript), gone from web servers (Java, then Ruby, then JavaScript/TypeScript), gone from mobile (Obj-C in iOS and Java in Android), and I think being slowly replaced even for embedded, I personally shipped embedded Linux stuff based on .NET Core.
Whenever you don’t care about performance too much, and have enough RAM — higher level memory safe languages are strictly better, IMO.
Still, there’re large areas when it’s unlikely to be replaced any time soon. Game engines are written in C++. Many low-level performance critical things like database engines are written in C or C++. C++ is all over CAD/CAM/CAE, 3D modeling and animations, VFX, everything related to multimedia (video streaming, processing, editing). And even some embedded: since you’re southern Germany, there’s probably a lot of work in automotive sector.
I think C++ is here to stay in most of these areas. When you have working set measured in gigabytes and want your software to be fast, the “have enough RAM” requirement of GC runtimes is often a showstopper. Large RAM requirement is expensive for code running on servers, and shrinks potential user base for code running on clients. There’re other things too: tooling, library ecosystem, performance in the broad sense.
Re: Ask HN: Should I learn C++ in 2021?
#19Re: Ask HN: Should I learn C++ in 2021?
#20Or is the codebase using a relatively modern standard (such as C++17 or C++20?)
Does the team track new versions of C++ upgrade every 3 years so your not left behind?
Remember if your not upgrading, it means you and your team is not able to take advantage of the latest C++ features. For example C++ 20 brought lots of goodies such as Modules, CoRoutines, Concepts and a new Ranges library.