Re:Why physicists still use Fortran (2015)
by Turing_Machine on Sunday October 15, 2017 @08:07PM
(#15480065)
Can verify that if you give numerical methods people C you may get wonders like (e.g.) main() functions that are 30 pages long.
No, I'm not kidding.
I shudder to think what they'd have done with C++. :-)
Re:Why physicists still use Fortran (2015)
by hzhou321 on Monday October 16, 2017 @01:03AM
(#15480948)
Don't be so assumptive that a 30 page long main function is bad code. The code still can be well organized and readable. Function is not the only method to organize code. Knuth's literate programming for example is invented to better organize code.
Function has its side effects. It's use as only once case is really questionable, justified by lack of other means.
They are both typically pretty bad - but there are many more ways to shoot yourself in the foot in c++
Re:Why physicists still use Fortran (2015)
by tragomaskhalos on Monday October 16, 2017 @10:59AM
(#15483638)
The very fact that the article itself, with a completely straight face, has all that malloc nonsense in there as "the way you have to do it in C++" is very telling of how easy it is to get the wrong end of the stick with C++ unless you are au fait with the history of the language and its evolution to better more modern idioms
Re:Why physicists still use Fortran (2015)
by adrianN on Sunday October 15, 2017 @02:23PM
(#15478370)
Well, that Fortran codebase probably also was written in large parts by PhD students, not export Fortran programmers.
Fortran is a much simpler and safer language than C++. And faster to learn. Fortran is even somewhat simpler than C or Java, whereas C++ is probably the most complicated language in the known universe.
So especially in the hands of non-experts, Fortran should produce less bugs.
Re:Why physicists still use Fortran (2015)
by HelloNurse on Sunday October 15, 2017 @04:33PM
(#15479152)
C++ is complex. Perl is complicated.
I would guess that a C++ codebase written by PhD students, not by seasoned C++ experts, is more complicated and much slower to debug, than a corresponding Fortran codebase.