(aside from the speed increase if you were to optimize c/c++ code and the closed source options with c/c++)
I am trying to figure out what you can do in c++ that you cannot do in for example Python. I've googled a bit to find a lot of people say bit shifting, but you can shift bits in python as well?
1 2 3 4 5 6 7 8 9 10
Python 3.2.3 (default, Oct 19 2012, 20:13:42)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license"for more information.
>>> int('01110001', 2)
>>> chr(int('01110001', 2))
>>> chr(int('01110001', 2) << 1)
and i also have come across where some say that c/c++ is being used because everything is already written in it, and would cost more to port a million lines of code over to (lets say python) and have one programmer maintain it, than to just leave it and have 10 programmers maintain it. And not to mention the profit-loss of the time it takes to port it,, and obviously, the actual time to port it.
I was really looking to grab a code snippet of something in c/c++ that makes it shine, and say "try to do this is python".
C++ is used when speed is highest priority (advanced 3D engines, mathematical evaluations, etc.).
what would you define as advanced 3d engines?
The part i dont understand is python's 3d is sufficient isn't it? How advanced do you mean? http://www.vrplumber.com/py3d.py
Are you referring to like the latest cutting edge graphics in gaming?
I am probably having trouble understanding the concept as i used 2d and see others writing python 3d games. In which some tweaking in python can get it up and running with no issues. Not top end games with crazy latest graphics. But decent working 3d games. I dont know i am having trouble wrapping my head around the complexity and length it takes to write code in c/c++.
Python is better where speed and memory is not the most important thing but code re-usability and readability.
isn't this like 90% of the time? Some of the operations are so tedious.
I dont know maybe i'll just stick with python until speed becomes an issue. It's not like i will ever participate in the latest graphical game.
ok thanks, i have another question regarding speed. As time goes on, we get more and more RAM, faster CPU's, etc. If a program ran at a inadequate speed with python before, with a new pc, wouldnt it in theory run faster (maybe inadequate maybe not)? I mean just a few years ago we were using single core, maybe 2 cores at X speed with like 2 GB RAM, now-a-days we have like 20 GB RAM, 8-16 cores running at even faster speeds. I would assume the speed issue line would become fuzzy?