Is python really better than C++ ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Is python really better than C++ ?

Leaving out the easiness offered in python as it can be gained by fluent language of any other language too . Why should python be preferred remembering the greater runtime involved in it comparision to C++.

19th Feb 2019, 8:17 AM
Aman Kumar
Aman Kumar - avatar
3 Answers
0
The question is misleading because you can't easily say one of them is better. You can read and write code way more quickly and easily in Python. So in cases where performance is not really an issue, you might not want to invest double or triple the effort writing it in C++ for basically the same result.
19th Feb 2019, 11:57 AM
HonFu
HonFu - avatar
0
I am not saying that one is better than other . It's just i am standing with a point or perception leading with python , so how can C++ be better than it
20th Feb 2019, 7:53 AM
Aman Kumar
Aman Kumar - avatar
0
Have you changed the original post? You can not dismiss the point of easiness completely: Even if you're fluent in both languages, one of them (C) is more verbose than the other. You have to objectively write more code. That's also true for natural languages btw: If you translate a novel from English to German, it gains about 20% although it tells the very same story. Also you have to compile every time you test which takes time. Also C++ is complex and you have to make more decisions at every turn. Pass it by value? Reference? Pointer? Which number type to choose? How to prevent overflow? To name just a few. Making decisions (and maybe mistakes) eats up time. But if you want/need maximum performance, it may be worth it.
20th Feb 2019, 8:51 AM
HonFu
HonFu - avatar