4 ms·
Talk is cheap, show me the code. There are exactly 0 snippets in this article, despite making subjective claims about the language being easier and more intuiti
by sakex 4y ago
Talk is cheap, show me the code. There are exactly 0 snippets in this article, despite making subjective claims about the language being easier and more intuitive than C/C++ for HPC.
- rad_gruchalski 4y agoHere’s a good introduction to coarrays: https://github.com/tkoenig1/coarray-tutorial/blob/main/tutorial.md https://github.com/tkoenig1/coarray-tutorial/blob/main/tutor....
- btrettel 4y agoIn my view, Fortran's biggest advantage over C and C++ is its much simpler mental model. Compared against C and C++, a Fortran programmer needs to think much less about pointers and memory addresses. For example, Fortran procedures (functions and subroutines) are pass-by-reference, compared against C functions being pass-by-value. A Fortran programmer doesn't need to call a procedure with (C syntax) func(&x), declare the procedure with int *x, dereference the pointer with *x to get the value inside the procedure, etc. They can simply write x in all those places and it'll work. Why is pass-by-reference good in computational science? Passing large arrays by value would waste memory. Pass-by-reference is a better choice for large arrays.