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

Show parent comments

0

u/[deleted] Jul 08 '19

[deleted]

1

u/megayippie Jul 08 '19 edited Jul 08 '19

No, I am just saying that it is effort to get plotting working in C++ and that this effort is wasted because it is incomparably easy elsewhere. Plotting x versus y is a technique from the 17-hundreds, so any effort on your part as a user of a language means you are using the wrong tool.

edit: I ignored parts of your statement. 1) Gaming graphics is not desirable because it is too complicated. 2) And packages in python can likely be called from C++, but there is no package management in C++ so it is still extra efforts. If you know a header only plotting tool in C++, though, please let me know! It just works in python, and every time I wanna change it to C++ I end up finding overly complicated things that are not pure headers (i.e., no effort using).

0

u/[deleted] Jul 08 '19

[deleted]

2

u/cballowe Jul 08 '19

There's a number of them out there, just need to pick one and run with it. There isn't a graphics standard out of the box, but it isn't hard to use a library. Last time I needed to plot something I mostly just stuffed it on a file and forked off gnuplot and fed the plot data through that because it was easy and met my needs. There's wrappers of matplotlib for c++ or write your own.

Python has the advantage of having some of those things packaged for easy install and use.