News for hackers. Stuff that matters.
Re:Why physicists still use Fortran by Someone on Monday December 19, 2016 @04:38AM (#13210421)
Please educate me and explain how that contradict anything I claimed, as I don't see it.

I claim it is only a promise, you claim you can call it with identical arguments. I don't see a contradiction; making a promise isn't the same as keeping it.

Similarly, your argument that it is fine to break that promise as long as you don't do anything bad inside the subroutine, I read as "you sometimes can get away with breaking a promise", but again, that's not the same as not making the promise.

What am I missing?

Re:Why physicists still use Fortran by CJefferson on Monday December 19, 2016 @07:04AM (#13210884)
The difference is subtle. Here is a (stupid) example:

    int chooseone(restrict int* a, restrict int* b, bool c) {
       if(c) return *a; else return *b;
    }
Here, we can pass the same pointer for a and b, because only one of them is ever accessed in any call to the function.
Re:Why physicists still use Fortran by Someone on Monday December 19, 2016 @10:36AM (#13212016)
Thanks. I reread http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf, and initially didn't get that from the informal description of restrict given there. It says (section 6.7.3):

"An object that is accessed through a restrict-qualified pointer has a special association with that pointer. This association, defined in 6.7.3.1 below, requires that all accesses to that object use, directly or indirectly, the value of that particular pointer."

So, it hinges on the meaning of 'accesses'; it is a runtime thing, not a compile-time thing.