Hacker News new | ask | show | jobs
by jcranmer 1026 days ago
Fortran has true multidimensional arrays in a way that C doesn't have--if you know an array is 5x3, you know that A[6, 1] doesn't map to a valid element whereas in C, it does map to a valid element. This turns out to make a lot of loop optimizations easier. (Also, being Fortran, you tend to pass around arrays with size information anyways, which C doesn't do, since you typically just get pointers with C).
1 comments

Is the size info compile-time or runtime in Fortran?
It can be both. If you know the dimension at compile time, it is compile time, if you don't it will be runtime.