I'm working on deep-frozen data structures made up of objects and arrays, and it would be ideal in my mind for a deep-frozen structure not to have the mutable Object and Array prototypes hanging off of each otherwise-immutable node.
In practice though while I can easily construct an Object with no prototype, and I can construct an array with no prototype, I cannot construct the array with anything close to reasonable performance because the only way I know of to do it is Object.setPrototypeOf([], null).
Once you do this though the good news is that things work correctly, e.g:
JSON.stringify(Object.setPrototypeOf([1, 2, 3], null)) === '[1,2,3]';
Was there ever a consideration of supporting something like Array.create(null)? Is there a better way to do this that I just don't know about?
From my dirt-simple benchmarks, creating the no-proto array using setPrototypeOf is a 60x slowdown over creating a normal array, but monomorphic access to the array once created is normal speed. So as far as I can tell the only barrier to being able to use no-proto structures more widely is that we have no good way to make arrays.