Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

No it didn't, it only introduced yet another source of UB, when C "experts" forget to use it the way ISO C rightfully expects.


You seem to be operating under the assumption that the Fortran compiler will catch pointer aliasing. In fact major implementations of Fortran do not (for technical reasons).

So the standard just says "don't do it, LOL" but then you are able to write Fortran violating this. Which is how you end up with bugs that go away when you switch optimization levels.


You seem to be operating under the assumption that the C developers know how to use restrict, when in practice they don't, so it hasn't made the argument fell apart.

In fact, only C++ is able to confortably beat Fortran, despite not having official support for restrict, because of the stronger type system and compile type metaprogramming that offer optimization opportunities out of reach to C compilers.

Usually HPC places like CERN and Fermilab don't migrate their aginging Fortran code to C, rather C++.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: