preventExtensions trap and its true/false protocol

David Bruant bruant.d at
Sun Mar 31 11:02:49 PDT 2013


The current proxy_spec [1], for the Object.preventExtensions built-in, 
suggests to read the result of the preventExtensions trap as a boolean 
and throw if falsy.
 From the developer perspective, this doesn't really add anything since 
it's already possible to throw from within the trap (and that's probably 
more explicit and clearer than returning false). This was pretty much 
agreed on in another recent thread (end of [2], then [3][4][5]).
Is it possible to remove this part? In the end, the trap return value 
would be just ignored.



More information about the es-discuss mailing list