The return value for Object.grouBy, the groups property on arrays returned by String.prototype.match, and objects returned by JSON.rawJSON all have null prototypes. Should objects returned by JSON.parseImmutable also do this?
One argument raised at a recent TC39 was that since prototypes are mutable, having a null prototype (or some kind of exotic frozen prototype) would be necessary for these returned objects to be truly frozen. On the other hand, it seems like a non-starter for Arrays returned by this function to have anything other than the normal Array prototype.
The return value for
Object.grouBy, thegroupsproperty on arrays returned byString.prototype.match, and objects returned byJSON.rawJSONall have null prototypes. Should objects returned byJSON.parseImmutablealso do this?One argument raised at a recent TC39 was that since prototypes are mutable, having a null prototype (or some kind of exotic frozen prototype) would be necessary for these returned objects to be truly frozen. On the other hand, it seems like a non-starter for Arrays returned by this function to have anything other than the normal Array prototype.