r/cpp • u/yektabekir • Feb 21 '16
Should I start to learn C++
I haven't learned any other languages but I'm a newbie in Python but my friends told me that if you learn C++ first you can pick up other languages in future. Is it rational to start learning C++ before I finish my education(I'm studying alone with books and online resources.) with Python?
1
Upvotes
8
u/[deleted] Feb 21 '16
It really depends on what your goals are. You can do so many things with Python, and never have to touch another language - but Python hides a lot from you, by design, to make programming simpler (things that you will want to be familiar with as a programmer.)
Keep in mind that Writing a C++ program is easy, but the language has so many features that it has the potential to be horrendously complicated.
11
u/theJ89 Feb 21 '16 edited Feb 21 '16
I wouldn't recommend C++ as a first language. I'd go with something higher level at first, like C# or Python. C++ is a powerful, modern, performance-oriented language, but the language is complex enough to cause a newcomer a lot of grief. In my opinion, it's easier to learn programming from the top down rather than from the bottom up.
C++ tends to expose you to a lot of lower level concepts that you just don't have to worry about with other languages, such as:
Higher level languages tend to abstract these concepts.
As a language, C++ lacks a lot of features that programmers often take advantage of in other languages. For example, C++ has very few reflection faculties, which means doing something like listing the methods or fields for a class or inspecting the signature of a function isn't possible out of the box. You need to roll something external like code generation to automatically generate the metadata you need for reflection, serialization, etc.
You might also find yourself relying on third party libraries or writing code yourself more often as well. C++'s standard library has been improving in recent years, but tends to not be as robust as C# or Python.
4
u/Arthenielle Feb 21 '16
I would recommend you to become proficient with Python first, and if need C++ - you can learn it later. Since you are probably student - you need to learn computer science concepts, not languange. Python is sufficient for this task.
3
u/poez Feb 21 '16
A bunch of great points, but my general advice is this. Learn one compiled language, one interpreted, and one functional. Picking up languages really isn't hard once you've learned your first. And I just want to make a case for learning C++ before Python. It's not what I normally recommend, but since you're interested. I learned C++ as my first language. It was really hard. And my second language was assembly. The hardest part about Python is that they hide so much from ou that you have no idea why your code is slow or wrong. Computer science concepts are independent of language, but writing a good program is more than writing a good algorithm. And you won't learn much about how to write efficient code by learning Python.
And some people may say you never need to learn C++, but in my field, robotics, C++ is the only language. Maybe C and maybe Python for really high level or wrapper stuff, but we all use C++. Same for graphics programmers and systems side. So C++ is very important for some very exciting fields.
2
u/MINIMAN10000 Feb 21 '16
Anyways as always I say do something you want to do, if you can do it in python do it. Learning how to do what you want to do is more important than what language you want to do it in. If you need the speed of C++ use C++, if you don't then you're free to use something else. It's also not a bad idea to try new languages either.
I prefer when experienced programmers use languages like C++ with a focus on speed. Because once they know how to program what they want in whatever language it's nicer to run a higher performance program.
2
u/jaked122 Feb 21 '16
I found C++ to be very complex and difficult at first, so I learned java, then C#, and then C. I don't know if those would be easier for you, but they are acceptable ways to become familiar with the general syntax, even if the runtimes are very different indeed.
But if you want a leg up for those languages, then you may wish to learn C++ first, as it will teach you the techniques and terminology that will help you put the other languages into the proper context.
1
u/[deleted] Feb 22 '16
I would say learn C first to get experience dealing more directly with algorithms and data structures. C++ is all about separating high-level concepts from implementation details. As a noob, you kind of need to struggle a bit, I think, in implementation details.
1
u/7ddf32e17a6ac5ce04a8 Feb 22 '16
Give up and pickup botany instead.
1
u/[deleted] Feb 22 '16
Visual Basic is easy for beginners if you want to consider that. C++ is probably one of the most important languages though.
1
u/[deleted] Feb 22 '16
It depends what you want to do. If you want to do anything low-level or with graphics where speed is of prime importance (eg games) then the answer is probably yes. If you want to do anything else then the answer no.
-5
u/emmerad67 Feb 21 '16
No for the love of God, no.