Still, if you're using Arrays, then under typical conditions there is absolutely no overlap between a and b unless pointer(a)==pointer(b). You can violate that yourself if you want to (using pointer_to_array), but in such circumstances you presumably know what you are doing.
--Tim On Wednesday, April 23, 2014 02:17:07 PM Jameson Nash wrote: > No, that is not necessarily true. For example, a subarray could point > somewhere inside the array, and most objects don't have a pointer method. > > The easiest assumption (which is probably also typically correct) is that > the output of all functions share part of the memory of its inputs. > Therefore, after passing an object into a function, it is generally best to > make a copy if you want to mutate the object. The ! convention > perhaps actually indicates the opposite: after the function call you > maintain full freedom to mutate the input arguments. > > On Wednesday, April 23, 2014, Ethan Anderes <ethanande...@gmail.com> wrote: > > Thanks Steven. That helps. So I can infer that no two variables can share > > overlapping memory without their pointers being the same?