Honing in on disagreement (rest is ok). Brandon Benvie wrote:
I don't see an issue with using a string to identify a builtin type for user operator overloading though, since you don't end up with multiple copies of the same user type. If my application (which uses multiple realms, like say loading all my third party modules in a sandbox realm), if I can specify how my Point class operator overloads with 'Array', it seems like it should work just fine with any values coming out of those modules
Including modules loaded in other realms?
. An Array would be identified the same way as it is currently in the ES6 spec: any object that is an Exotic Array Object would match 'Array'; for map, any object that has [[MapData]] matches 'Map', etc (basically how `Object.prototype.toString` figures out what to call something).
This still is privileged spec-only/builtin-only territory. How can user-code make a Map-like that has [[MapData]]?
/be _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

