*.empty Idea

Boris Zbarsky bzbarsky at mit.edu
Thu Apr 30 20:25:30 UTC 2015

On 4/30/15 3:46 PM, C. Scott Ananian wrote:
> I like the idea of snapshot methods, but they can be implemented in user
> code using subclasses in ES6.

Can they?  You can't create immutable snapshots in user code afaict...

> But that would still have required an explicit test in
> Map.clear/set/delete to ensure that they were operating on an instanceof
> Map and not just on a ReadOnlyMap.

More likely an internal slot check, not an instanceof check.


More information about the es-discuss mailing list