CERN is porting all (almost all) their software to python and several other scientific communities are doing the same thing. Why?
- Python was originally designed to work side by side with C and C++. (See below.)
- It's so simple, it requires only 1/6 the amount of code that C/C++ do.
- It is fast doing typical scientific computations. With the numPy libraries, numerical computations are comparable with C.
- Python is actively developed and getting faster. In fact a new compiler named PyPy is being developed with a goal of making python as fast as C.
- SciPy is feature rich, giving python as much built in scientific functionality as matlab.
- Python has great multi-threading capibilities.
- It has automatic garbage collection. (It handles memory issues for you.)
- Runs off a virtual machine. (Compiles on one machine, compiles on them all!)
- It's free, cross platform and all the rage in open source development. Ubuntu and Fedora consider being able to code in python as one of their top desired talents.
- Python unlike FORTRAN doesn't keep you locked in to only being able to do numerical stuff.
However, I'll tell you why I think it could be the future. First, a good python programmer will always have fast code. Currently, what you do is write the computationally difficult routines in C/C++ and the rest in python. (Python was built for this.) Python is so easy to code in it really accelerates your coding without sacrificing computational speed.
However, as many aspects of python get faster, you can begin replacing more and more C/C++ code with python. Hence, your coding speed will continue to improve without sacrificing computational performance.
One school of thought is that it is fastest to first program everything in python. Then you can convert the computationally intense stuff to C/C++ faster than you could have done programming completely in C/C++ from the start. In the end your code is just as fast and you've save lots of time and headache coding.
Like everything, I could be wrong, but more and more I think python is going to work side by side with C/C++ replacing more and more of it as the years go on. As it does, it becomes the language of choice.
Fortran was, is and will be the future of scientific computing/HPC
ReplyDelete