On Mon, Jul 29, 2013 at 5:20 PM, Brendan Eich <bren...@mozilla.com> wrote: > Brandon Benvie wrote: >> . 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]]?
It can't, precisely because the spec is defined in terms of [[MapData]]. If it were instead defined in terms of a SimpleMap with just get/set/has/delete, user-code could handle it. Similarly with other built-ins - they could be defined in terms of a simplified version of themselves. ~TJ _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss