Jens Mueller: > 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?
Here's my answer. I think you can't do it, currently. To do it you have to rely on the programmer like C does, or enforce it statically, like some languages with advanced type systems do. By general design decision D generally wants to enforce its attributes, this removes the first option. I presume the second option requires type system complexities that D doesn't want, at the moment (like linear types). Bye, bearophile
