News for hackers. Stuff that matters.
Re:The State of Fortran by dralley on Thursday April 07, 2022 @01:02AM (#30940784)
> When C99 introduced the restrict keyword this argument fell apart.

1) Nobody puts "restrict" everywhere, and in C it can be very dangerous to do so unless you're exceedingly careful.

2) The fact that few codebases use it means it's riddled with compiler bugs even if you are exceedingly careful. Just look at how many times Rust has had to disable noalias due to LLVM bugs and regressions.

Re:The State of Fortran by necheffa on Thursday April 07, 2022 @07:40AM (#30943175)
Restrict is used where it matters.

Just because Fortran does the equivalent of implicitly using restrict everywhere does not mean the compiler actually statically checks for abuse. You can just as easily write bad pointer aliasing code in Fortran and depending on what optimization level you built with you may or may not experience memory corruption and/or segmentation fault at run time.

Re:The State of Fortran by zozbot234 on Thursday April 07, 2022 @07:46AM (#30943212)
AIUI, the only language in common use that has comprehensive static checks for their equivalent to 'restrict' is Rust. Not coincidentally, there's quite a bit of interest in Rust adoption for numerics-heavy and scientific codes, the traditional preserve of FORTRAN.