Apr-26-2017, 04:22 PM
They exist for very different problem domains. Depending on what you're doing, maybe c++ is the right choice.
If execution speed or memory usage are critical (they normally aren't), then c++ is the right choice.
If prototype speed or legibility is more important, python is probably the better choice.
If you're building a website, python is 100% always the right choice, although if speed becomes an issue, you could write a backend service in c++ to speed it up, and even then python would be a better frontend (although caching would probably give a greater benefit anyway).
If you're building a device driver for a refrigerator, c++ would be a better choice, if available (you might only have access to c, though).
If you're working on a video game, then... it depends on what kind. But c++ would probably be better. Even then, I'd say Java/C#/Lua would be better than either, unless execution speed was an issue as before.
If execution speed or memory usage are critical (they normally aren't), then c++ is the right choice.
If prototype speed or legibility is more important, python is probably the better choice.
If you're building a website, python is 100% always the right choice, although if speed becomes an issue, you could write a backend service in c++ to speed it up, and even then python would be a better frontend (although caching would probably give a greater benefit anyway).
If you're building a device driver for a refrigerator, c++ would be a better choice, if available (you might only have access to c, though).
If you're working on a video game, then... it depends on what kind. But c++ would probably be better. Even then, I'd say Java/C#/Lua would be better than either, unless execution speed was an issue as before.