www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Should GC.malloc be considered 'pure'?

bearophile Wrote:

 Did you miss the discussion I've had here about the  trasparent? The
allocation of heap memory can be considered pure if you use the allocated
memory as a referentially transparent value (this means it's allowed to be used
by reference, but your code is not allowed to read the value of the reference
itself, so the future state of the code depends only on the contents of the
referenced memory, and not the reference itself.

Won't this pollute everything with trasparent annotations, because code usually doesn't depend on pointer value so it would want to work on transparent pointers.
Jun 09 2011