Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

C++ makes you able to write simple tasks in a complicated ways, thus a great asset to the global hidden mission of software industry which is to write code that will seem brilliant but fail in a devilish way. So go for it.

“There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.” — C.A.R. Hoare, The 1980 ACM Turing Award Lecture

You can also learn more than one langage because they fits domain of excellencies you want to master:

- C low level programming (zmq switched from c++ to C because of error handling) - high level portable language that can bind on libraries (python to avoid hispter mac users using ruby) ; - something for concurrency (Go); - R-project for data treatment; - vanilla JS because mixing LISP difficulties with braces syntax is insanely cool; - PHP and Perl to feel with your guts what a wrong language is (hint: it is all about maintainability); - ASM 68000 because motorola 68000 is the most beautiful mix between a good design and implementation and it will make you truly able to build a consistent mental map of what a computer really is; - Tk because 25 years it still is the most portable way of doing GUI and has inspired everyone; - Forth because it is fun to use postscript as a real programming language; ....



sort by: page size:

Just one language? Of course not that's selling yourself short. Surely, with great effort and many years, you can master many languages, and use them masterfully in concert like many do with C and Python. And if you can do that then you can master the many faces of C++. Maybe you just don't need to.

C++ is amazing. Learn to Code.

Curious why you chose C++?

Pro (Arguments for learning C++):

* It will massively increase your marketability: C++ is one of the most popular languages around, and it will stay this way for at least 10-20 years. Most desktop programs are still written in it, most AAA games, and most operating systems, most multi-media data processing uses either C or C++, and it's still the most popular language in the embedded space. Wherever execution speed is a goal, C++ is the lingua franca. As an iOS dev, these might be markets you didn't consider before, but knowing C++ will go a long way towards unlocking them for you, should you ever want to go into them. It will increase the potential places of employment for you like very few other languages could.

* C++ is powerful. It lets you do stuff that's out of reach in a lot of other languages. Have you ever thought "gee, this inner loop costs too much runtime but is easily vectorizable. Man I wish I could hardcode this piece of code in SSE intrinsics (or other modern CPU instructions) or write inline assembly"? Or "man, I could actually already compute this at compile time if the processor would let me" or "If I could store this information in the upper bits of the memory addresses that go unused, I could squeeze the data in a cache line, making cache misses almost a non-issue"? C++ makes these things (and many others) available to you, if you ever want to.

* It will massively increase your software-craftmanship: There are very few popular languages that will expose you to such a breath and depth of programming language concepts, From bare-metal pointers and references, manual memory management & smart pointers to template metaprogramming. At least for me, no other programming language has given me this many instructional "aha" moments, because C++ makes a lot of stuff explicit that is just hidden away in most other languages. Even if you end up not using C++ much later on, knowing and understanding the concepts of C++ will make you a much better programmer in other languages as well. And will make learning other new programming languages much easier. Haskell and LISP are the only two languages I can think of that had similar effects for me.

Contra (Arguments against learning it):

* C++ is difficult. It has massive footguns and error messages (especially in templated code) are sometimes not very helpful. A lot of things that are easy in other languages are suddenly hard, and manual. Some bugs are absolutely non-trivial, hard to understand and to debug, on a level that you haven't seen before. With great power comes great responsibility.

* C++ is old: This may just be a riff on "it's difficult". But on several occasions, it'll get on your nerve. The build and link system are outdated. And C++ in 1998 looked different than C++ in 2017. And the language is still evolving.


Some things of top quality and value are not noticed immediately. Just because someone tells you a Lamborghini, Buggati or Rolls Royce are top of the line and like no other car you have experienced you will not be able to comprehend what they are saying until you have learned to drive the car and have experienced it for yourself. The favorite languages and operating systems of many are built in C and/or C++ because of many of their exceptional qualities for the jobs they are being used for. Instead of saying it is hard it is better to choose the right tool for the job or what you are capable of learning for what you want to do.

You do not learn C or C++ if your goal is to become a regular Joe developer and you are not heavily focused on high performance and security. If you are more focused on security and performance there is a good chance you learned C and C++ so you could create modules for the web server, middle ware, operating system, etc. that you are using to improve performance and or security. You also need to know C and C++ to troubleshoot bugs or performance issues that may occur which will require you to go under the hood and review the source code for the language which is normally in C or C++, and if your using a debugger you will need to know some assembly from time to time.

It is always ill advised and frowned upon to become another copy paster and not understand what you are doing especially when using a programming language with full access to everything the operating system has to offer. It is like going to a job interviewing saying you know C++ and have never programmed any production quality code in C++ and the only thing you have done is some tutorials online. When some tough problems come up you will not be able to troubleshoot the problem first and be on hold waiting for someone to update your question online with something you hope is correct but you will unfortunately not be able to trust and verify the solution.

It is always the best course of action to take something you see as hard and take it as a challenge to learn it and become proficient so you are at least at an intermediate stage and are not struggling with the basics of the language. This will give you the ability to talk with others on a more professional level to solve any problems that will come up so the conversation will be constructive. It also feels good when you look back at something you thought was so hard and develop highly secure and high performance applications that you thought were not possible when you wrote your first few lines of code.


c++ for high level and C for lower level and library building.

bonus : you don't have to learn a new language every decade.


c/c++ adds to the market value of a dev iff that dev needs it for their job. Same story with every other language. Javascript won't help you get a ruby job for instance. You might consider learning C & assembly, because they'll give you a greater appreciation for what your computer is doing closer to the metal. You don't have to be good, but learning to do at least basic stuff can help you be better with other languages.

C and C++ are always a good languages to learn. You can code from the lowest to the highest levels, procedurally or OO. People starting out with a garbage-collected language would find it harder to understand memory management or lower level optimizations. Also, as a programmer, C and C++ will provide gainful employment for the next few decades at least. They are unlikely to really be replaced by anything else for their versatility.

For learning all the crazy and bad things you can do with programming languages, C++ can't be beat.

I learned C because of classes in MPI and I tried to go back to it after years of Python and MATLAB but the amount of boilerplate code and the workflow slowed me down too much. C++ is definitely a fine choice if you are a great programmer but I don't find it easy at all to prototype or maintain codebases in languages like that. YMMV

But no one can deny that c++ is the most fascinating programming language in this world. You can either spend or waste as long time as you want to __LEARN__ this language and never can say I understand ALL.

I've considered doing this - I spend so much time learning new languages that I am average in many but not an expert in one. However, when I look at what language to pick for that 'one', I can't decide. It's gone from Python -> Common Lisp -> Rust, etc... What are some arguments for C++ to be The One?

I agree, you can do a lot with C++, there's a lot of advanced libraries for different purposes, but it's simply not pleasant experience, especially, if anyone gets fancy with everything that C++ offers and you need to understand it.

Personally I want to focus on what code is doing, it's also important to understand how it's doing something, but typically I don't care that much about performance, I just want language that will produce valid code without too much effort and thousands little details that you need to be aware of and with languages like C++ you need to pay high attention to code you write and debugging can be horror story, once something goes bad.

For me, if I need to go low-level, Go is sufficient. It's readable, performant and it's harder to shot your feet with it.


I've been programming mostly in C++ for ten years. There has been a time when I was proud of being knowledgeable about its many intricacies. Nowadays, I don't do that anymore.

I recommend you avoid trying to master C++: it's a gigantic waste of your time, of your brains and of your productivity. Lots of useless complexity. Just like learning Perl is (been there, done that, too).

OTOH, C is a language worth learning well.


With the recent updates to the standard C++ is actually a really pleasant language to use. You just have to know a lot, but the reward is there.

Pick C or C++. There is a huge amount of code out there in these languages and learning one of them will open the door to you being able to benefit / learn from it.

This might sound kinda weird, but I really like reading about coding languages and with c++ there is so much to discover that I really like that. It's like buying an expensive car with a lot of options and even after years you discover new buttons. If you like reading about low level code and implementations of recent new techniques in computer science, then you'll love c++, there is always so much going on. I've learned almost all coding languages and they've become simple and boring, articles about them feel like reading a children's book. It's definitely not easy to learn all features, but it also doesn't become boring so fast.

OPs asked which language to learn from a career perspective, so C++ is good advice in that respect

Wow, I like C++ (at least, more than most), but I don't agree on any of those points.

In fact, I am sad to say that unless your job requires it, I can't really think of any reason to learn the language. It relies on a mixture of paradigms that are easier learned from other languages where they are isolated. And for lolevel stuff, you are better off learning C.

next

Legal | privacy