2 ms·
https://en.wikipedia.org/wiki/Restrict https://en.wikipedia.org/wiki/Restrict is an attempt to declare that the programmer has avoided aliasing. https://en.wiki
by 082349872349872 4y ago
https://en.wikipedia.org/wiki/Restrict https://en.wikipedia.org/wiki/Restrict is an attempt to declare that the programmer has avoided aliasing. https://en.wikipedia.org/wiki/Separation_logic https://en.wikipedia.org/wiki/Separation_logic is a very fancy attempt to reason in the presence of possible aliasing.
History says the Euclid approach was a huge over-reaction, but consider also the naive memcpy:
while(count--)
*dst++ = *src++;
which works just fine ... as long as the destination and source buffers don't overlap (are not aliased).
You might consider no-aliasing imperative to have been an attempt to stake out a halfway position between "pointers are the goto of data structures" wild west full imperative, and "no mutation, even when unaliased" strict functional, disciplines.