On May 27, 2010, at 7:12 PM, Sam Ruby wrote:
Say we add egal, so one can tell the difference between a[0] and a[1]
even if they happen to contain the same bits, because that difference
might matter due to one of them being mutated to have different bits.
I don't follow that.
If a[0] and a[1] have the same bits, why would a[0] === a[1] ever be
false?
Because mutability means a[0] and a[1] do not have the same identity,
and code that must care about identity (security, hashing, anything)
must be able to tell the difference between the two structs.
If a[0] and a[1] are immutable value types, then no worries. But
structs in ECMA-334 (C#) and in the WebGL alternative we are trying to
develop are mutable.
Then do the objections to unfrozen value types go away? Cc'ing Mark.
I am not assuming that === be overloadable. Nor am I presuming that
value types are mutable.
You wrote "... I came to the conclusion that structs in ECMA 262,
just like in ECMA 334, should be value types" which I claim means
value types can be mutable.
Short on time, I'll stop here because it seems to me you are presuming
mutability (for some value types, anyway).
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss