r/cpp • • Jul 08 '19

C++ vs. Python

Although I have a bit of experience in both, I'm still having a hard time contemplating which of the two I should be aiming for mastery. Python is very beginner friendly, with a lot of resources and libraries. On the other hand, C++ is known for being a powerful language, while being complex and with a not so small learning curve. I wanted to focus more on robotics and you know, the cool stuff. But wait there's more...... Rasberry pi (python) or Arduino (c++). I'm just a naive 17 year old in my freshmen year of college, and am taking Electronics Engineering. Please enlighten me with your opinions. 😅

2 Upvotes

29 comments sorted by

View all comments

2

u/neuroblaster Jul 09 '19

For robotics i'd say C++, but learning curve is a good point. I personally wouldn't start any new project in Python because of the ugly situation with Python 2, it's also very hard to work with binary in Python 3. In my experience, if you work with binary then it's easier to do that in C++ than in Python 3. But there is a point on learning curve again.

Check out C, it's much simpler than C++, for a lot of people it's a gateway to C++ and you can write Python extensions in it too. As of Python, i'd say check out Go, it has smaller learning curve, strongly typed and compiles into native code. IMO Go is more closely related to C-family if you're interested in it.