Walter Bright wrote: > On 4/28/2011 11:44 AM, Jens Mueller wrote: > >Thanks. So if a compiler can assume that pointers do not alias it can > >generate much better code. What's D's standpoint on that matter then? > >C99 has restrict. I never came across something similar in D. > > Const and immutable. >
That allows specifying that the memory pointed to is only readable which enables doing the optimizations. But what if the memory is writable but I can my sure that the pointers pointing to it will never alias? How do I pass that information to the compiler? Jens