How mutable is immutable?
Malte Skarupke
malteskarupke at web.de
Wed Oct 17 17:15:56 PDT 2012
The issue is that you're thinking as you would in Java.
I guess the rule in D for immutable is this: Immutable data won't
change as long as it exists.
The last part of that sentence would be a stupid thing to say in
Java because things don't just cease to exist while you're still
doing something with them. That is not the case in D.
That being said it's very unlikely that you will ever run into
this situation. You have to end the lifetime of the object
manually to run into these issues. And in that case it'll be very
easy to figure out what's wrong.
More information about the Digitalmars-d
mailing list