On Tue, 24 Nov 2009 10:19:57 -0500, Lutger <[email protected]>
wrote:
Just to clarify, is it true that stomping over mutable arrays is covered
by
the spec (currently), but stomping immutable arrays is classified as a
bug?
I was very surprised by this.
Stomping of arrays is covered by the spec (without reference to how it
affects immutability), but so is immutability, so technically it is an
inconsistency in the spec, but it's an inconsistency that cannot be fixed
without declaring that all append operations render other slices that
alias the same data invalid.
See http://www.digitalmars.com/d/2.0/arrays.html#resize for the spec info
on stomping, note there is no mention of immutability being compromised.
-Steve