C. Scott Ananian
ecmascript at cscott.net
Thu Apr 30 19:46:10 UTC 2015
I like the idea of snapshot methods, but they can be implemented in user
code using subclasses in ES6. I'm particularly interested in the "lock
down in place" mechanism because it *cannot* be implemented in user code.
And yes, if we had it all to do over again, it would have been nice if the
Map prototype chain was:
Map instance -> Map.prototype -> ReadOnlyMap.prototype -> null
And clear/set/delete were properties of Map.prototype.
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss