I ran into the following HN comment:
But to say something nice about Fortran: dynamically-sized-mutable-stack-allocated-arrays. (-fstack-arrays)
In Julia, stack-allocated objects are immutable, and (partly for that reason) also generally very small. You wouldnât want to create a new 30x30 array every time you want to edit a single value. You also canât get stack pointers, meaning you canât use masked load/store operations to vectorize code when the array dimensions arenât a multiple of SIMD-vector-width.
This means to write fast code, I normally heap allocate everything. And to avoid triggering the GC, that means keeping the same arrays alive, and avoiding any temporaries.
With Fortran, you donât have to worry about any of that. You can always write convenient and clear code, and itâs likely to be very fast. If you hold vectorization in mind while laying out your data and computations, compilers will normally do a great job figuring it out.
Why does julia have this drawback if fortran doesnât (requiring immutable fixed static arrays for stack allocation) and can/will it change?