3 ms·
Julia (and Fortran) have a concept called offset arrays where you can basically start on any sort of index: https://github.com/JuliaArrays/OffsetArrays.jl https
by fault1 5y ago
Julia (and Fortran) have a concept called offset arrays where you can basically start on any sort of index:
https://github.com/JuliaArrays/OffsetArrays.jl https://github.com/JuliaArrays/OffsetArrays.jl
IMHO, one of the biggest advantages of Julia _is_ arrays.
- TheRealKing 5y agoJulia does not have offset arrays. There is an external Julia package that can mimic Fortran's intrinsic behavior (arbitrary start index).
- fault1 5y agojulia's package manager is quite modern (and very well designed relative to the mess that is either C++ or python, no experience in modern fortran for me), so something being external or in the core language is not as important as it is with other languages. this is also the same model as in for example, Rust or Javascript. in fact, it appears to me that they intentionally made the core language with fewer amounts of intrinsics relative to other languages. Many of the packages in JuliaArrays/ might as well as be in the core language, especially things like StaticArrays: https://github.com/orgs/JuliaArrays/repositories https://github.com/orgs/JuliaArrays/repositories
- mrtweetyhack 5y agothen why not start at 0 by default?