ITADN

How are cross-realm comparisons intended to work?

#30Openiainireland 创建于 2025-11-10
I
iainirelandcommented
Is the intent of this proposal to have composites with identical contents from different realms compare equal? If so: it's not clear that's compatible with the proposed interning semantics. The point of interning is to allow === comparison using object identity (implemented via pointer comparison). You can't do that with two objects with (eg) different prototype chains. Unless I'm missing something, you can either have === comparison, or cross-realm comparison, but not both. (Technically you can also give up on pointer comparison, but from an implementation standpoint that's a non-starter performance-wise.)
7 条评论