Axel Rauschmayer wrote:
The (x === Object(x)) test evaluates to true for value objects in this proposal, though. This may break code looking for "primitives" but we need to see what such code expects. Is it filtering out the legacy typeof-result primitives (plus "null"), trying to find values for which typeof currently returns "object" or "function"? If so, I don't see a problem: int64, bignum, etc. are not legacy primitives. Is this test looking for objects that are their own wrappers? Again all is well, unless "mutable wrapper" is assumed -- but that's not safe in the ES5 era to assume, anyway.

The most frequent use case I’ve encountered: does the value have a prototype (i.e., will Object.getPrototypeOf() work)?

I’m assuming that value objects will have a prototype, accessible via Object.getPrototypeOf (?)

Yes, they are after all value objects :-P.

js> Object.getPrototypeOf(0UL)
0UL

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to