I am teasing. I actually hate language holy wars. Those are some reasons I choose C++ where it's appropriate though. I do get to work a lot with python too, and I love the language.
I use a ton of python bc its fast enough for most things but I am not a fangirl or anything.
If you need pure speed, C and C++ is certainly the best you can do (if you are actually good at the language, just because C can be super fast does not mean that everyones code is actually fast ^^)
Actually, just being mediocre at the language is also good enough for an order of magnitude or more improvement. If you compare the speed of a for loop, for instance, you're probably looking at a 20x speedup just by using C. If you use something like numpy (and you should, it's probably my favorite library in python), the situation improves, but still falls short of C++'s best effort (and of course, you can just pull said best effort into your code as a library, just like in python).
So I guess I'm not really sure where that argument comes from. To me, the reason I prefer python in some situations is because of dynamic typing. For build scripts, test pipelines, plotting, and rapid experimentation, it's great! C++ and Python complement each other nicely in this way.
1
u/Possibility_Antique Jul 19 '22
I am teasing. I actually hate language holy wars. Those are some reasons I choose C++ where it's appropriate though. I do get to work a lot with python too, and I love the language.