News for hackers. Stuff that matters.
Re:Why physicists still use Fortran by jheriko on Sunday December 18, 2016 @08:06PM (#13208756)
some of the information here is a bit wrong. the idea that const is weaker than parameter is true, but not for the reasons given. any function taking a float, int etc. in C++ can also take a const float or const int.

its also unfair to suggest that C/C++ is as fault with not allowing a = b * c with array types. this is a failing of the standard library and easily fixed... operator overloading lets you create exactly this functionality, and std::valarray already does this for a lot of what you get in Fortran...

Re:Why physicists still use Fortran by pklausler on Sunday December 18, 2016 @11:11PM (#13209464)
Good luck getting a high performance implementation of A=B+C without memory allocation out of a library.
Re:Why physicists still use Fortran by jheriko on Monday December 19, 2016 @03:09PM (#13214593)
rolling your own is pretty easy, it is a shame that the C++ standard library is a dire wasteland of bad implementations. you are right that valarray will do heap allocations and making it work on the stack is a real ballache.
Re:Why physicists still use Fortran by whyever on Tuesday December 20, 2016 @03:52AM (#13218399)
This is really not hard using expression templates.