On 4/8/12 9:59 AM, Michel Fortin wrote:
But as soon as you take a pointer to that string, you break the immutability guaranty:immutable(char)[] s = "abcd"; immutable(char)* p = s.ptr; s = "defg"; // assigns to where?
Taking .ptr will engender a copy. A small regression will be that address of individual chars cannot be taken.
Andrei