Allen Wirfs-Brock wrote: > I think I previously asked if anybody is aware of situations where > Object.isFrozen tests are done but Object.freeze is not used to set > objects to the frozen state. So far, no answers. Anybody?
Speaking just from my own experience as a user of ES5, I have not found `Object.isFrozen` to be helpful yet. If I want to see if I can configure a property, I check `Object.isExtensible` and `!Object.prototype.hasOwnProperty.call(obj, key) || Object.getOwnPropertyDescriptor(obj, key).configurable`. `Object.isFrozen` and `Object.isSealed` don't really seem that helpful to me for the very reasons you've discussed: They don't represent any real object state, so they don't accurately tell me what can be done with an object. If I could I would argue in favor of their removal, though I know it's too late for that. I would be curious to see legitimate uses of `isFrozen` and `isSealed` in existing code if anyone has anything to offer. Nathan _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss